CollectionSummary¶
-
class
lsst.daf.butler.registry.summaries.CollectionSummary(datasetTypes: lsst.daf.butler.core.named.NamedValueSet[lsst.daf.butler.core.datasets.type.DatasetType], dimensions: lsst.daf.butler.registry.summaries.GovernorDimensionRestriction)¶ Bases:
objectA 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 CollectionSummaryfor 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() → lsst.daf.butler.registry.summaries.CollectionSummary¶ Return a deep copy of this object.
Returns: - copy :
CollectionSummary A copy of
selfthat can be modified without modifyingselfat all.
- copy :
-
is_compatible_with(datasetType: lsst.daf.butler.core.datasets.type.DatasetType, restriction: lsst.daf.butler.registry.summaries.GovernorDimensionRestriction, rejections: Optional[List[str], None] = None, name: Optional[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),
Falsewill 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,
Falsewill 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
Falseis returned.- name :
str, optional Name of the collection this object summarizes, for use in messages appended to
rejections. Ignored ifrejectionsisNone.
Returns: - datasetType :
-
classmethod
makeEmpty(universe: lsst.daf.butler.core.dimensions._universe.DimensionUniverse) → lsst.daf.butler.registry.summaries.CollectionSummary¶ Construct a
CollectionSummaryfor a collection with no datasets.Parameters: - universe :
DimensionUniverse Object that manages all dimensions.
Returns: - summary :
CollectionSummary Summary object with no dataset types and no governor dimension values.
- universe :
-
union(*others) → lsst.daf.butler.registry.summaries.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.
Returns: - unioned :
CollectionSummary New summary object that represents the union of
selfwithothers.
- *others :
-