GovernorDimensionRestriction¶
- 
class lsst.daf.butler.registry.summaries.GovernorDimensionRestriction(mapping: lsst.daf.butler.core.named.NamedKeyDict[lsst.daf.butler.core.dimensions._governor.GovernorDimension, typing.Set[str]][lsst.daf.butler.core.dimensions._governor.GovernorDimension, Set[str]])¶
- Bases: - lsst.daf.butler.NamedKeyMapping- A custom mapping that represents a restriction on the values one or more governor dimensions may take in some context. - Parameters: - mapping : NamedKeyDict[GovernorDimension,Set[str]]
- Mapping from governor dimension to the values it may take. Dimensions not present in the mapping are not constrained at all. 
 - Attributes Summary - names- Return the set of names associated with the keys, in the same order. - Methods Summary - add(dimension, value)- Add a single dimension value to the restriction. - byName()- Return a - Mappingwith names as keys and the- selfvalues.- copy()- Return a deep copy of this object. - get(k[,d])- intersection(*others)- Construct a restriction that permits only values permitted by all of the input restrictions. - intersection_update(other, Union[str, …)- Update - selfto include only dimension values in both- selfand- other.- items()- keys()- makeEmpty(universe)- Construct a - GovernorDimensionRestrictionthat allows no values for any governor dimension in the given- DimensionUniverse.- makeFull()- Construct a - GovernorDimensionRestrictionthat allows any value for any governor dimension.- union(*others)- Construct a restriction that permits any values permitted by any of the input restrictions. - update(other, Union[str, Iterable[str]]])- Update - selfto include all dimension values in either- selfor- other.- update_extract(data_id)- Update - selfto include all governor dimension values in the given data ID (in addition to those already in- self).- values()- Attributes Documentation - Methods Documentation - 
add(dimension: lsst.daf.butler.core.dimensions._governor.GovernorDimension, value: str) → None¶
- Add a single dimension value to the restriction. - Parameters: - dimension : GovernorDimension
- Dimension to update. 
- value : str
- Value to allow for this dimension. 
 
- dimension : 
 - 
byName() → Dict[str, V_co]¶
- Return a - Mappingwith names as keys and the- selfvalues.- Returns: 
 - 
copy() → lsst.daf.butler.registry.summaries.GovernorDimensionRestriction¶
- Return a deep copy of this object. - Returns: - copy : GovernorDimensionRestriction
- A copy of - selfthat can be modified without modifying- selfat all.
 
- copy : 
 - 
get(k[, d]) → D[k] if k in D, else d. d defaults to None.¶
 - 
intersection(*others) → lsst.daf.butler.registry.summaries.GovernorDimensionRestriction¶
- Construct a restriction that permits only values permitted by all of the input restrictions. - Parameters: - *others : Mapping[Dimension,strorIterable[str] ]
- Mappings to intersect with - self. These may be other- GovernorDimensionRestrictioninstances or any other kind of mapping from dimension to- stror iterable of- str.
- Returns
- ——-
- intersection : GovernorDimensionRestriction
- New restriction object that represents the intersection of - selfwith- others.
 
- *others : 
 - 
intersection_update(other: Mapping[lsst.daf.butler.core.dimensions._governor.GovernorDimension, Union[str, Iterable[str]]]) → None¶
- Update - selfto include only dimension values in both- selfand- other.- Parameters: - other : Mapping[Dimension,strorIterable[str] ]
- Mapping to intersect into - self. This may be another- GovernorDimensionRestrictionor any other mapping from dimension to- stror iterable of- str.
 
- other : 
 - 
items() → a set-like object providing a view on D's items¶
 - 
keys() → a set-like object providing a view on D's keys¶
 - 
classmethod makeEmpty(universe: lsst.daf.butler.core.dimensions._universe.DimensionUniverse) → lsst.daf.butler.registry.summaries.GovernorDimensionRestriction¶
- Construct a - GovernorDimensionRestrictionthat allows no values for any governor dimension in the given- DimensionUniverse.- Parameters: - universe : DimensionUniverse
- Object that manages all dimensions. 
 - Returns: - restriction : GovernorDimensionRestriction
- Restriction instance that maps all governor dimensions to an empty set. 
 
- universe : 
 - 
classmethod makeFull() → lsst.daf.butler.registry.summaries.GovernorDimensionRestriction¶
- Construct a - GovernorDimensionRestrictionthat allows any value for any governor dimension.- Returns: - restriction : GovernorDimensionRestriction
- Restriction instance that contains no keys, and hence contains allows any value for any governor dimension. 
 
- restriction : 
 - 
union(*others) → lsst.daf.butler.registry.summaries.GovernorDimensionRestriction¶
- Construct a restriction that permits any values permitted by any of the input restrictions. - Parameters: - *others : Mapping[Dimension,strorIterable[str] ]
- Mappings to union into - self. These may be other- GovernorDimensionRestrictioninstances or any other kind of mapping from dimension to- stror iterable of- str.
 - Returns: - unioned : GovernorDimensionRestriction
- New restriction object that represents the union of - selfwith- others.
 
- *others : 
 - 
update(other: Mapping[lsst.daf.butler.core.dimensions._governor.GovernorDimension, Union[str, Iterable[str]]]) → None¶
- Update - selfto include all dimension values in either- selfor- other.- Parameters: - other : Mapping[Dimension,strorIterable[str] ]
- Mapping to union into - self. This may be another- GovernorDimensionRestrictionor any other mapping from dimension to- stror iterable of- str.
 
- other : 
 - 
update_extract(data_id: lsst.daf.butler.core.dimensions._coordinate.DataCoordinate) → None¶
- Update - selfto include all governor dimension values in the given data ID (in addition to those already in- self).- Parameters: - data_id : DataCoordinate
- Data ID from which governor dimension values should be extracted. Values for non-governor dimensions are ignored. 
 
- data_id : 
 - 
values() → an object providing a view on D's values¶
 
- mapping :