DatasetRef

class lsst.daf.butler.DatasetRef(datasetType, dataId, id=None, run=None)

Bases: object

Reference to a Dataset in a Registry.

A DatasetRef may point to a Dataset that currently does not yet exist (e.g., because it is a predicted input for provenance).

Parameters:
datasetType : DatasetType

The DatasetType for this Dataset.

dataId : dict or DataId

A dict of Dimension link fields that labels the Dataset within a Collection.

id : int, optional

A unique identifier. Normally set to None and assigned by Registry

Attributes Summary

actualConsumers A sequence of Quantum instances that list this Dataset in their actualInputs attributes.
components Named DatasetRef components.
dataId A dict of Dimension link fields that labels the Dataset within a Collection (dict or DataId).
datasetType The DatasetType associated with the Dataset the DatasetRef points to.
id Primary key of the dataset (int)
predictedConsumers A sequence of Quantum instances that list this Dataset in their predictedInputs attributes.
producer The Quantum instance that produced (or will produce) the Dataset.
run The Run instance that produced (or will produce) the Dataset.

Methods Summary

detach() Obtain a new DatasetRef that is detached from the registry.
isComposite() Boolean indicating whether this DatasetRef is a composite type.

Attributes Documentation

actualConsumers

A sequence of Quantum instances that list this Dataset in their actualInputs attributes.

Read-only; update via Registry.markInputUsed(). May be an empty list if no provenance information is available.

components

Named DatasetRef components.

Read-only; update via Registry.attachComponent().

dataId

A dict of Dimension link fields that labels the Dataset within a Collection (dict or DataId).

datasetType

The DatasetType associated with the Dataset the DatasetRef points to.

id

Primary key of the dataset (int)

Typically assigned by Registry.

predictedConsumers

A sequence of Quantum instances that list this Dataset in their predictedInputs attributes.

Read-only; update via Quantum.addPredictedInput(). May be an empty list if no provenance information is available.

producer

The Quantum instance that produced (or will produce) the Dataset.

Read-only; update via Registry.addDataset(), QuantumGraph.addDataset(), or Butler.put(). May be None if no provenance information is available.

run

The Run instance that produced (or will produce) the Dataset.

Read-only; update via Registry.addDataset() or Butler.put().

Methods Documentation

detach()

Obtain a new DatasetRef that is detached from the registry.

Its id property will be None. This can be used for transfers and similar operations.

isComposite()

Boolean indicating whether this DatasetRef is a composite type.

Returns:
isComposite : bool

True if this DatasetRef is a composite type, False otherwise.