DatasetRef

class lsst.daf.butler.DatasetRef(datasetType, dataId, *, id=None, run=None, hash=None, components=None, conform=True)

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 : DataCoordinate

A mapping of dimensions 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 mapping of Dimension primary key values that labels the Dataset within a Collection (DataCoordinate).
datasetType The DatasetType associated with the Dataset the DatasetRef points to.
dimensions The dimensions associated with the underlying DatasetType
hash Secure hash of the DatasetType name and DataId (bytes).
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.
isComponent() Boolean indicating whether this DatasetRef refers to a component of a composite.
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 mapping of Dimension primary key values that labels the Dataset within a Collection (DataCoordinate).

datasetType

The DatasetType associated with the Dataset the DatasetRef points to.

dimensions

The dimensions associated with the underlying DatasetType

hash

Secure hash of the DatasetType name and DataId (bytes).

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 addDataset(), addOutput(), or 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 addDataset() or 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.

isComponent()

Boolean indicating whether this DatasetRef refers to a component of a composite.

Returns:
isComponent : bool

True if this DatasetRef is a component, False otherwise.

isComposite()

Boolean indicating whether this DatasetRef is a composite type.

Returns:
isComposite : bool

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