ExpandedDataCoordinate¶
- 
class lsst.daf.butler.ExpandedDataCoordinate¶
- Bases: - lsst.daf.butler.DataCoordinate- A data ID that has been expanded to include all relevant metadata. - Instances should usually be obtained by calling - Registry.expandDataId.- Parameters: - graph : DimensionGraph
- The dimensions identified by this instance. 
- values : tuple
- Tuple of primary key values for the given dimensions. 
- records : Mapping
- Dictionary mapping - DimensionElementto- DimensionRecord.
- full : Mapping
- Dictionary mapping dimensions to their primary key values for all dimensions in the graph, not just required ones. Ignored unless - conformis- False.
- region : sphgeom.Region, optional
- Region on the sky associated with this data ID, or - Noneif there are no spatial dimensions. At present, this may be the special value- NotImplementedif there multiple spatial dimensions identified; in the future this will be replaced with the intersection. Ignored unless- conformis- False.Timespan
- timespan : Timespan, optionalTimespan
- Timespan associated with this data ID, or - Noneif there are no temporal dimensions. Ignored unless- conformis- False.
- conform : bool, optional
- If - True(default), adapt arguments from arbitrary mappings to the custom dictionary types and check that all expected key-value pairs are present.- Falseis only for internal use.
 - Notes - To maintain Liskov substitutability with - DataCoordinate,- ExpandedDataCoordinatemostly acts like a mapping that contains only values for its graph’s required dimensions, even though it also contains values for all implied dimensions - its length, iteration, and keys/values/items views reflect only required dimensions. Values for the primary keys of implied dimensions can be obtained from the- fullattribute, and are also accessible in dict lookups and the- inoperator.- Attributes Summary - full- Dictionary mapping dimensions to their primary key values for all dimensions in the graph, not just required ones ( - IndexedTupleDict).- graph- records- Dictionary mapping - DimensionElementto the associated- DimensionRecord(- IndexedTupleDict).- region- Region on the sky associated with this data ID, or - Noneif there are no spatial dimensions (- sphgeom.Region).- timespan- Timespan associated with this data ID, or - Noneif there are no temporal dimensions (- TimeSpan).- universe- The universe that defines all known dimensions compatible with this coordinate ( - DimensionUniverse).- Methods Summary - byName()- Return a true - dictkeyed by- strdimension name and the same values as- self.- fingerprint(update)- Update a secure hash function with the values in this data ID. - get(k[,d])- items()- keys()- matches(other)- Test whether the values of all keys in both coordinates are equal. - pack(name, *, returnMaxBits)- Pack this data ID into an integer. - standardize(mapping, Any]] = None, *, graph, …)- Adapt an arbitrary mapping and/or additional arguments into a true - DataCoordinate, or augment an existing one.- subset(graph)- Return a new - DataCoordinatewhose graph is a subset of- self.graph.- values()- Attributes Documentation - 
full¶
- Dictionary mapping dimensions to their primary key values for all dimensions in the graph, not just required ones ( - IndexedTupleDict).- Like - DataCoordinateitself, this dictionary can be indexed by- strname as well as- Dimensioninstance.
 - 
graph¶
 - 
records¶
- Dictionary mapping - DimensionElementto the associated- DimensionRecord(- IndexedTupleDict).- Like - DataCoordinateitself, this dictionary can be indexed by- strname as well as- DimensionElementinstance.
 - 
region¶
- Region on the sky associated with this data ID, or - Noneif there are no spatial dimensions (- sphgeom.Region).- At present, this may be the special value - NotImplementedif there multiple spatial dimensions identified; in the future this will be replaced with the intersection.
 - 
timespan¶
- Timespan associated with this data ID, or - Noneif there are no temporal dimensions (- TimeSpan).
 - 
universe¶
- The universe that defines all known dimensions compatible with this coordinate ( - DimensionUniverse).
 - Methods Documentation - 
byName() → Dict[str, Any]¶
- Return a true - dictkeyed by- strdimension name and the same values as- self.
 - 
fingerprint(update)¶
- Update a secure hash function with the values in this data ID. - Parameters: 
 - 
get(k[, d]) → D[k] if k in D, else d. d defaults to None.¶
 - 
items() → a set-like object providing a view on D's items¶
 - 
keys() → a set-like object providing a view on D's keys¶
 - 
matches(other) → bool¶
- Test whether the values of all keys in both coordinates are equal. - Parameters: - other : DataCoordinate
- The other coordinate to compare to. 
 - Returns: 
- other : 
 - 
pack(name: str, *, returnMaxBits: bool = False) → int¶
- Pack this data ID into an integer. - Parameters: - name : str
- Name of the - DimensionPackeralgorithm (as defined in the dimension configuration).
- returnMaxBits : bool, optional
- If - True(- Falseis default), return the maximum number of nonzero bits in the returned integer across all data IDs.
 - Returns: 
- name : 
 - 
static standardize(mapping: Optional[Mapping[str, Any]] = None, *, graph: Optional[DimensionGraph] = None, universe: Optional[DimensionUniverse] = None, **kwds) → DataCoordinate¶
- Adapt an arbitrary mapping and/or additional arguments into a true - DataCoordinate, or augment an existing one.- Parameters: - mapping : Mapping, optional
- An informal data ID that maps dimension names to their primary key values (may also be a true - DataCoordinate).
- graph : DimensionGraph
- The dimensions to be identified by the new - DataCoordinate. If not provided, will be inferred from the keys of- mapping, and- universemust be provided unless- mappingis already a- DataCoordinate.
- universe : DimensionUniverse
- All known dimensions and their relationships; used to expand and validate dependencies when - graphis not provided.
- kwds
- Additional keyword arguments are treated like additional key-value pairs in - mapping.
 - Returns: - coordinate : DataCoordinate
- A validated - DataCoordinateinstance. May be a subclass instance if and only if- mappingis a subclass instance and- graphis a subset of- mapping.graph.
 - Raises: - TypeError
- Raised if the set of optional arguments provided is not supported. 
- KeyError
- Raised if a key-value pair for a required dimension is missing. 
 - Notes - Because - DataCoordinatestores only values for required dimensions, key-value pairs for other related dimensions will be ignored and excluded from the result. This means that a- DataCoordinatemay contain fewer key-value pairs than the informal data ID dictionary it was constructed from.
- mapping : 
 - 
subset(graph: lsst.daf.butler.core.dimensions.graph.DimensionGraph) → lsst.daf.butler.core.dimensions.coordinate.ExpandedDataCoordinate¶
- Return a new - DataCoordinatewhose graph is a subset of- self.graph.- Subclasses may override this method to return a subclass instance. - Parameters: - graph : DimensionGraph
- The dimensions identified by the returned - DataCoordinate.
 - Returns: - coordinate : DataCoordinate
- A - DataCoordinateinstance that identifies only the given dimensions.
 - Raises: - KeyError
- Raised if - graphis not a subset of- self.graph, and hence one or more dimensions has no associated primary key value.
 
- graph : 
 - 
values() → an object providing a view on D's values¶
 
- graph :