DimensionRecord¶
- 
class lsst.daf.butler.DimensionRecord(*args)¶
- Bases: - object- Base class for the Python representation of database records for a - DimensionElement.- Parameters: - args
- Field values for this record, ordered to match - __slots__.
 - Notes - DimensionRecordsubclasses are created dynamically for each- DimensionElementin a- DimensionUniverse, and are accessible via the- DimensionElement.RecordClassattribute. The- DimensionRecordbase class itself is pure abstract, but does not use the- abcmodule to indicate this because it does not have overridable methods.- Record classes have attributes that correspond exactly to the fields in the related database table, a few additional methods inherited from the - DimensionRecordbase class, and two additional injected attributes:- definitionis a class attribute that holds the- DimensionElement;
- timespanis a property that returns a- Timespan, present only on record classes that correspond to temporal elements.
 - The field attributes are defined via the - __slots__mechanism, and the- __slots__tuple itself is considered the public interface for obtaining the list of fields. It is guaranteed to be equal to- DimensionElement.makeTableSpec().fields.nameswhen- makeTableSpecdoes not return- None.- Instances are usually obtained from a - Registry, but in the rare cases where they are constructed directly in Python (usually for insertion into a- Registry), the- fromDictmethod should generally be used.- DimensionRecordinstances are immutable.- Attributes Summary - dataId- A dict-like identifier for this record’s primary keys ( - DataCoordinate).- Methods Summary - fromDict(mapping, Any])- Construct a - DimensionRecordsubclass instance from a mapping of field values.- toDict()- Return a vanilla - dictrepresentation of this record.- Attributes Documentation - 
dataId¶
- A dict-like identifier for this record’s primary keys ( - DataCoordinate).
 - Methods Documentation - 
classmethod fromDict(mapping: Mapping[str, Any])¶
- Construct a - DimensionRecordsubclass instance from a mapping of field values.- Parameters: - mapping : Mapping
- Field values, keyed by name. The keys must match those in - __slots__, with the exception that a dimension name may be used in place of the primary key name - for example, “tract” may be used instead of “id” for the “id” primary key field of the “tract” dimension.
 - Returns: - record : DimensionRecord
- An instance of this subclass of - DimensionRecord.
 
- mapping :