CollectionSummary¶
- class lsst.daf.butler.registry.summaries.CollectionSummary(datasetTypes: NamedValueSet[DatasetType], dimensions: GovernorDimensionRestriction)¶
Bases:
object
A summary of the datasets that can be found in a collection.
Methods Summary
copy
()Return a deep copy of this object.
is_compatible_with
(datasetType, restriction)Test whether the collection summarized by this object should be queried for a given dataset type and governor dimension values.
makeEmpty
(universe)Construct a
CollectionSummary
for a collection with no datasets.union
(*others)Construct a summary that contains all dataset types and governor dimension values in any of the inputs.
Methods Documentation
- copy() CollectionSummary ¶
Return a deep copy of this object.
- Returns:
- copy
CollectionSummary
A copy of
self
that can be modified without modifyingself
at all.
- copy
- is_compatible_with(datasetType: DatasetType, restriction: GovernorDimensionRestriction, rejections: List[str] | None = None, name: str | None = None) bool ¶
Test whether the collection summarized by this object should be queried for a given dataset type and governor dimension values.
- Parameters:
- datasetType
DatasetType
Dataset type being queried. If this collection has no instances of this dataset type (or its parent dataset type, if it is a component),
False
will always be returned.- restriction
GovernorDimensionRestriction
Restriction on the values governor dimensions can take in the query, usually from a WHERE expression. If this is disjoint with the data IDs actually present in the collection,
False
will be returned.- rejections
list
[str
], optional If provided, a list that will be populated with a log- or exception-friendly message explaining why this dataset is incompatible with this collection when
False
is returned.- name
str
, optional Name of the collection this object summarizes, for use in messages appended to
rejections
. Ignored ifrejections
isNone
.
- datasetType
- Returns:
- classmethod makeEmpty(universe: DimensionUniverse) CollectionSummary ¶
Construct a
CollectionSummary
for a collection with no datasets.- Parameters:
- universe
DimensionUniverse
Object that manages all dimensions.
- universe
- Returns:
- summary
CollectionSummary
Summary object with no dataset types and no governor dimension values.
- summary
- union(*others: CollectionSummary) CollectionSummary ¶
Construct a summary that contains all dataset types and governor dimension values in any of the inputs.
- Parameters:
- *others
CollectionSummary
Restrictions to combine with
self
.
- *others
- Returns:
- unioned
CollectionSummary
New summary object that represents the union of
self
withothers
.
- unioned