DimensionConfig¶
- class lsst.daf.butler.DimensionConfig(other: Config | str | ParseResult | ResourcePath | Path | Mapping[str, Any] | None = None, validate: bool = True, searchPaths: Sequence[str | ParseResult | ResourcePath | Path] | None = None)¶
Bases:
ConfigSubset
Configuration that defines a
DimensionUniverse
.The configuration tree for dimensions is a (nested) dictionary with five top-level entries:
version: an integer version number, used as keys in a singleton registry of all
DimensionUniverse
instances;namespace: a string to be associated with the version in the singleton registry of all
DimensionUnivers
instances;skypix: a dictionary whose entries each define a
SkyPixSystem
, along with a special “common” key whose value is the name of a skypix dimension that is used to relate all other spatial dimensions in theRegistry
database;elements: a nested dictionary whose entries each define
StandardDimension
orStandardDimensionCombination
.topology: a nested dictionary with
spatial
andtemporal
keys, with dictionary values that each define aStandardTopologicalFamily
.packers: ignored.
See the documentation for the linked classes above for more information on the configuration syntax.
- Parameters:
- other
Config
orstr
ordict
, optional Argument specifying the configuration information as understood by
Config
. IfNone
is passed then defaults are loaded from “dimensions.yaml”, otherwise defaults are not loaded.- validate
bool
, optional If
True
required keys will be checked to ensure configuration consistency.- searchPaths
list
ortuple
, optional Explicit additional paths to search for defaults. They should be supplied in priority order. These paths have higher priority than those read from the environment in
ConfigSubset.defaultSearchPaths()
. Paths can bestr
referring to the local file system or URIs,lsst.resources.ResourcePath
.
- other
Attributes Summary
Name of the file containing defaults for this config class.
Keys that are required to be specified in the configuration.
Methods Summary
from_simple
(simple)Load the configuration from a serialized version.
Construct a
DimensionConstructionBuilder
.Convert this configuration to a serializable Pydantic model.
Attributes Documentation
- defaultConfigFile: ClassVar[str | None] = 'dimensions.yaml'¶
Name of the file containing defaults for this config class.
- requiredKeys: ClassVar[Sequence[str]] = ('version', 'elements', 'skypix')¶
Keys that are required to be specified in the configuration.
Methods Documentation
- static from_simple(simple: SerializedDimensionConfig) DimensionConfig ¶
Load the configuration from a serialized version.
- Parameters:
- simple
SerializedDimensionConfig
Serialized configuration to be loaded.
- simple
- Returns:
- config
DimensionConfig
Dimension configuration.
- config
- makeBuilder() DimensionConstructionBuilder ¶
Construct a
DimensionConstructionBuilder
.The builder will reflect this configuration.
- Returns:
- builder
DimensionConstructionBuilder
A builder object populated with all visitors from this configuration. The
finish
method will not have been called.
- builder
- to_simple() SerializedDimensionConfig ¶
Convert this configuration to a serializable Pydantic model.
- Returns:
- model
SerializedDimensionConfig
Serializable Pydantic version of this configuration.
- model