GovernorDimension¶
- class lsst.daf.butler.GovernorDimension(name: str, *, metadata_columns: NamedValueAbstractSet[IntColumnSpec | StringColumnSpec | FloatColumnSpec | HashColumnSpec | BoolColumnSpec], unique_keys: NamedValueAbstractSet[IntColumnSpec | StringColumnSpec | HashColumnSpec], doc: str)¶
Bases:
Dimension
Governor dimension.
A special
Dimension
with no dependencies and a small number of rows, used to group the dimensions that depend on it.- Parameters:
- name
str
Name of the dimension.
- metadata_columns
NamedValueAbstractSet
[MetadataColumnSpec
] Field specifications for all non-key fields in this dimension’s table.
- unique_keys
NamedValueAbstractSet
[KeyColumnSpec
] Fields that can each be used to uniquely identify this dimension (given values for all required dimensions). The first of these is used as (part of) this dimension’s table’s primary key, while others are used to define unique constraints.
- doc
str
Extended description of this element.
- name
Notes
Most dimensions have exactly one governor dimension as a required dependency, and queries that involve those dimensions are always expected to explicitly identify the governor dimension value(s), rather than retrieve all matches from the database. Because governor values are thus almost always known at query-generation time, they can be used there to simplify queries, provide sensible defaults, or check in advance for common mistakes that might otherwise yield confusing (albeit formally correct) results instead of straightforward error messages.
Governor dimensions may not be associated with any kind of topological extent.
Governor dimension rows are often affiliated with a Python class or instance (e.g.
lsst.obs.base.Instrument
) that is capable of generating the rows of at least some dependent dimensions or providing other related functionality. In the future, we hope to attach these instances to governor dimension records (instantiating them from information in the database row when it is fetched), and use those objects to add additional functionality to governor dimensions, but a number of (code) dependency relationships would need to be reordered first.Attributes Summary
Extended description of this dimension element.
Return the implied dimensions.
Whether this element's records should be aggressively cached, because they are small in number and rarely inserted.
Additional metadata fields included in this element's table.
Return unique string identifier for this endpoint (
str
).Return the required dimensions.
Return the relationship families to which this endpoint belongs.
Descriptions of unique identifiers for this dimension.
Attributes Documentation
- MAX_KEY_LENGTH = 128¶
- documentation¶
- implied¶
- is_cached¶
- metadata_columns¶
- name¶
- required¶
- topology¶
- unique_keys¶