DeferredDatasetHandle

class lsst.daf.butler.DeferredDatasetHandle(butler: Butler, datasetRefOrType: Union[lsst.daf.butler.core.datasets.DatasetRef, lsst.daf.butler.core.datasets.DatasetType, str], dataId: Union[dict, lsst.daf.butler.core.dimensions.coordinate.DataCoordinate, Mapping[str, Any]], parameters: Optional[dict], kwds: dict)

Bases: object

This is a class to support deferred loading of a dataset from a butler.

Parameters
butlerButler

The butler that will be used to fetch the deferred dataset

datasetRefOrTypeDatasetRef, DatasetType, or str

When DatasetRef the dataId should be None. Otherwise the DatasetType or name thereof.

dataIddict or DataCoordinate, optional

A dictionary of Dimension link name, value pairs that label the DatasetRef within a Collection. When None, a DatasetRef should be provided as the first argument.

parametersdict

Additional StorageClass-defined options to control reading, typically used to efficiently read only a subset of the dataset.

kwdsdict

Additional keyword arguments used to augment or construct a DataId. See DataId construction parameters.

Methods Summary

get([parameters])

Retrieves the dataset pointed to by this handle

Methods Documentation

get(parameters: Union[None, dict] = None, **kwargs: dict) → Any

Retrieves the dataset pointed to by this handle

This handle may be used multiple times, possibly with different parameters.

Parameters
parametersdict or None

The parameters argument will be passed to the butler get method. It defaults to None. If the value is not None, this dict will be merged with the parameters dict used to construct the DeferredDatasetHandle class.

kwargsdict

This argument is deprecated and only exists to support legacy gen2 butler code during migration. It is completely ignored and will be removed in the future.

Returns
returnObject

The dataset pointed to by this handle