CollectionType¶
- class lsst.daf.butler.CollectionType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
IntEnum
Enumeration used to label different types of collections.
Attributes Summary
A
CALIBRATION
collection operates like aTAGGED
collection, but also associates each dataset with a validity range as well.A
CHAINED
collection is simply an ordered list of other collections to be searched.A
RUN
collection (also just called a 'run') is the initial collection a dataset is inserted into and the only one it can never be removed from.Datasets can be associated with and removed from
TAGGED
collections arbitrarily.Methods Summary
all
()Return a
frozenset
containing all members.from_name
(name)Return the
CollectionType
given its name.from_names
(names)Return a
frozenset
containing theCollectionType
instances corresponding to the names.Attributes Documentation
- CALIBRATION = 4¶
A
CALIBRATION
collection operates like aTAGGED
collection, but also associates each dataset with a validity range as well. Queries against calibration collections must include a timestamp as an input.It is difficult (perhaps impossible) to enforce a constraint that there be one dataset with a particular dataset type and data ID at any particular timestamp in the database, so higher-level tools that populate calibration collections are expected to maintain that invariant instead.
- CHAINED = 3¶
A
CHAINED
collection is simply an ordered list of other collections to be searched. These may include otherCHAINED
collections.
- RUN = 1¶
A
RUN
collection (also just called a ‘run’) is the initial collection a dataset is inserted into and the only one it can never be removed from.Within a particular run, there may only be one dataset with a particular dataset type and data ID.
- TAGGED = 2¶
Datasets can be associated with and removed from
TAGGED
collections arbitrarily.Within a particular tagged collection, there may only be one dataset with a particular dataset type and data ID.
Methods Documentation
- classmethod all() frozenset[lsst.daf.butler.registry._collection_type.CollectionType] ¶
Return a
frozenset
containing all members.
- classmethod from_name(name: str) CollectionType ¶
Return the
CollectionType
given its name.- Parameters:
- name
str
Name of the collection type. Case insensitive.
- name
- Returns:
- collection_type
CollectionType
The matching collection type.
- collection_type
- Raises:
- KeyError
Raised if the name does not match a collection type.
- classmethod from_names(names: Iterable[str] | None) frozenset[lsst.daf.butler.registry._collection_type.CollectionType] ¶
Return a
frozenset
containing theCollectionType
instances corresponding to the names.- Parameters:
- Returns:
- types
frozenset
ofCollectionType
The matching types.
- types
- Raises:
- KeyError
Raised if the name does not correspond to a collection type.