SerializableDimensionData

class lsst.daf.butler.SerializableDimensionData(root: RootModelRootType = PydanticUndefined)

Bases: RootModel

A pydantic model for normalized serialization of dimension records.

While dimension records are serialized directly via this model, they are deserialized by constructing a DimensionRecordSetDeserializer from this model, which allows full validation to be performed only on the records that are actually loaded.

Attributes Summary

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Methods Summary

from_record_sets(record_sets)

Construct from an iterable of DimensionRecordSet objects.

make_deserializers(universe)

Make objects from this model that handle the second phase of deserialization.

Attributes Documentation

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

Methods Documentation

classmethod from_record_sets(record_sets: Iterable[DimensionRecordSet]) SerializableDimensionData

Construct from an iterable of DimensionRecordSet objects.

Parameters:
record_setsIterable [ DimensionRecordSet ]

Sets of dimension records, each for a different dimension element.

Returns:
modelSerializableDimensionData

New model instance.

make_deserializers(universe: DimensionUniverse) list[DimensionRecordSetDeserializer]

Make objects from this model that handle the second phase of deserialization.

Parameters:
universeDimensionUniverse

Definitions of all dimensions.

Returns:
deserializerslist [ DimensionRecordSetDeserializer ]

A list of deserializers objects, one for each dimension element.