DataId¶
- 
class lsst.daf.butler.DataId(dataId=None, *, dimensions=None, dimension=None, universe=None, region=None, entries=None, **kwds)¶
- Bases: - collections.abc.Mapping- A dict-like identifier for data usable across multiple collections and - DatasetTypes.- Parameters: - dataId : dictorDataId
- A - dict-like object containing- Dimensionlinks. If this is a true- DataIdand the set of dimensions identified does not change, this object will be updated in-place and returned instead of a new instance.
- dimensions : iterable of Dimensionorstr, optional
- The set of dimensions the - DataIdwill identify, either as- Dimensioninstances or string names thereof.
- dimension : Dimensionorstr, optional
- The single dimension this - DataIdwill identify (along with all of its required dependencies).
- universe : DimensionGraph, optional
- A graph containing all known dimensions and joins. Must be provided if names are passed instead of - Dimensioninstances in- dimensionsor- dimension, or when dimensions are inferred from the provided link keys.
- region : lsst.sphgeom.ConvexPolygon, optional
- Spatial region on the sky associated with this combination of dimension entries. 
- entries : dict, optional
- A nested dictionary of additional metadata column values associated with these dimensions, with - DimensionElementinstances or- strnames as the outer keys,- strcolumn names as inner keys, and column values as inner dictionary values. If the- dimensionargument is provided, may also be a non-nested dict containing metadata column values for just that dimension.
- kwds : dict, optional
- Additional key-value pairs to update - dataIdwith.
 - Raises: - ValueError
- Raised if incomplete or incompatible arguments are provided. 
 - Notes - The keys of a - DataIdcorrespond to the “link” columns of one or more- Dimensions, while values identify particular rows in the tables or views for those- Dimensions. In addition to implementing the (immutable)- collections.abc.MappingAPI,- DataIds have additional attributes to hold additional metadata, regions, and definitions for those- Dimensions. They are also hashable, and hence can be used as keys in dictionaries.- The - DataIdclass represents a complete ID that has either been obtained from or validated with the set of known- Dimensions. Regular- dicts are typically used to represent conceptual data IDs that have not been validated. The- DataIdconstructor serves as a sort of standardization routine; most APIs that conceptually operate on- DataIds should accept either true- DataIds or regular dicts via a single- dataIdargument, and pass this through the- DataIdconstruction (usually with additional keyword arguments forwarded) to guarantee a true- DataId. When convenient, that- DataIdshould also be returned.- The set of dimensions a - DataIdidentifies can be provided to the constructor four ways:- Multiple dimensions may be passed via the dimensionsargument.
- A single dimension may be passed via the dimensionargument.
- If a true DataIdis passed, its dimensions will be used if they are not overridden by one of the above.
- If none of the above is provided, the dimensions are inferred from the
set of keys provided in dataId,extra, andkwds; any dimensions inuniversewhose links are a subset of those keys is included.
 - Attributes Summary - entries- A nested dictionary of additional values associated with the identified dimension entries ( - DimensionKeyDict).- Methods Summary - dimensions([implied])- Return dimensions this - DataIdidentifies.- fields(element[, region, metadata])- Return the entries for a particular - DimensionElement.- get(k[,d])- implied()- Return a new - DataIdwith all implied dimensions of- self“upgraded” to required.- items()- keys()- updateHash(message)- Add this data ID to a secure hash. - values()- Attributes Documentation - 
entries¶
- A nested dictionary of additional values associated with the identified dimension entries ( - DimensionKeyDict).- The outer dictionary maps - DimensionElementobjects to dictionaries of field names and values.- Entry values are not in general guaranteed to have been validated against any actual - Registryschema.
 - Methods Documentation - 
dimensions(implied=False)¶
- Return dimensions this - DataIdidentifies.- Parameters: - Returns: - graph : DimensionGraph
 
- graph : 
 - 
fields(element, region=True, metadata=True)¶
- Return the entries for a particular - DimensionElement.- Parameters: - element : DimensionElementorstr
- The - Dimensionor- DimensionJoinfor which fields should be returned.
- region : bool
- Whether to include the region in the result. Ignored if this - DataIdhas no region or the given- Dimensionis not the region holder for it.
- metadata : bool
- Whether to include metadata (non-link, non-region columns) in the result. Ignored if this - DataIdhas no metadata for the given- Dimension.
 - Returns: - fields : dict
- A dictionary of column name-value pairs. 
 
- element : 
 - 
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¶
 - 
updateHash(message)¶
- Add this data ID to a secure hash. - Parameters: 
 - 
values() → an object providing a view on D's values¶
 
- dataId :