FileDataset#
- class lsst.daf.butler.FileDataset(path: str | ParseResult | ResourcePath | Path, refs: DatasetRef | list[DatasetRef], *, formatter: str | type[Formatter] | Formatter | FormatterV2 | type[FormatterV2] | None = None)#
Bases:
objectA struct that represents a dataset exported to a file.
Parameters#
- path
lsst.resources.ResourcePathorstr Path to the dataset (
lsst.resources.ResourcePathorstr).If the dataset was exported with
transfer=None(i.e. in-place), this is relative to the datastore root (only datastores that have a well-defined root in the local filesystem can be expected to support in-place exports). Otherwise this is relative to the directory passed toDatastore.export.- refs
list[DatasetRef] Registry information about the dataset.
- formatter
FormatterorstrorNone, optional A
Formatterclass or fully-qualified name.
Attributes Summary
Methods Summary
from_simple(dataset, *, dataset_type_loader, ...)Deserialize a
SerializedFileDatasetinto aFileDataset.Convert this instance to a simplified, JSON-serializable object.
Attributes Documentation
- formatter: str | type[Formatter] | Formatter | FormatterV2 | type[FormatterV2] | None#
- path: str | ResourcePath#
- refs: list[DatasetRef]#
Methods Documentation
- static from_simple(dataset: SerializedFileDataset, *, dataset_type_loader: Callable[[str], DatasetType], universe: DimensionUniverse) FileDataset#
Deserialize a
SerializedFileDatasetinto aFileDataset.Parameters#
- dataset
SerializedFileDataset Object to deserialize.
- dataset_type_loader
Callable[[str],DatasetType] Function that takes a string dataset type name as its only parameter, and returns an instance of
DatasetType. Used to deserialize theDatasetRefinstances contained in the serializedFileDataset.- universe
DimensionUniverse Dimension universe associated with the
Butlerinstance that created the serializedFileDatasetinstance.
Returns#
- file_dataset
FileDataset Deserialized equivalent of the input dataset.
- dataset
- to_simple() SerializedFileDataset#
Convert this instance to a simplified, JSON-serializable object.
Returns#
- serialized
SerializedFileDataset Serializable representation of this
FileDatasetinstance.
- serialized
- path