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:
butler : Butler

The butler that will be used to fetch the deferred dataset

datasetRefOrType : DatasetRef, DatasetType, or str

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

dataId : dict 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.

parameters : dict

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

kwds : dict

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

Methods Summary

get(parameters, dict] = None, **kwargs) Retrieves the dataset pointed to by this handle

Methods Documentation

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

Retrieves the dataset pointed to by this handle

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

Parameters:
parameters : dict 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.

kwargs : dict

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:
return : Object

The dataset pointed to by this handle