38 """A class to store a catalog, exposure, and metadata for a given dataId.
40 The intent is to store an exposure and an associated measurement catalog.
41 Users may omit one but not both (e.g. if the intent is just to attach
42 a dataId and metadata to a catalog or exposure).
45 def band(self) -> str:
49 def calib(self) -> afwImage.PhotoCalib | None:
52 dataId: dafButler.DataCoordinate | dict = Field(
53 title=
"A DataCoordinate or dict containing a 'band' item")
54 catalog: afwTable.SourceCatalog |
None = Field(
None, title=
"The measurement catalog, if any")
55 exposure: afwImage.Exposure |
None = Field(
None, title=
"The exposure, if any")
56 id_tract_patch: int = Field(0, title=
"A unique ID for this tract-patch pair")
57 metadata: dict = Field(default_factory=dict, title=
"Arbitrary metadata")
61 raise ValueError(
"Must specify at least one of catalog/exposure")
62 if 'band' not in self.
dataId:
63 raise ValueError(f
"dataId={self.dataId} must have a band")