Quantum

class lsst.daf.butler.Quantum(task, run, *args, **kwargs)

Bases: lsst.daf.butler.core.execution.Execution

A discrete unit of work that may depend on one or more datasets and produces one or more datasets.

Most Quanta will be executions of a particular SuperTask’s runQuantum method, but they can also be used to represent discrete units of work performed manually by human operators or other software agents.

Parameters:
task : str or SuperTask

Fully-qualified name of the SuperTask that executed this Quantum.

run : Run

The Run this Quantum is a part of.

Attributes Summary

actualInputs A dict of input datasets that were actually used, with the same form as Quantum.predictedInputs.
endTime
host
id
outputs A dict of output datasets (to be) generated for this quantum, with the same form as predictedInputs.
predictedInputs A dict of input datasets that were expected to be used, with DatasetType names as keys and a list of DatasetRef instances as values.
run The Run this Quantum is a part of (Run).
startTime
task Task associated with this Quantum.

Methods Summary

addOutput(ref) Add an output DatasetRef to the Quantum.
addPredictedInput(ref) Add an input DatasetRef to the Quantum.

Attributes Documentation

actualInputs

A dict of input datasets that were actually used, with the same form as Quantum.predictedInputs.

All returned sets must be subsets of those in predictedInputs.

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

endTime
host
id
outputs

A dict of output datasets (to be) generated for this quantum, with the same form as predictedInputs.

Read-only; update via addOutput().

predictedInputs

A dict of input datasets that were expected to be used, with DatasetType names as keys and a list of DatasetRef instances as values.

Input Datasets that have already been stored may be DatasetRefs, and in many contexts may be guaranteed to be. Read-only; update via Quantum.addPredictedInput().

run

The Run this Quantum is a part of (Run).

startTime
task

Task associated with this Quantum.

If the Quantum is associated with a SuperTask, this is the SuperTask instance that produced and should execute this set of inputs and outputs. If not, a human-readable string identifier for the operation. Some Registries may permit the value to be None, but are not required to in general.

Methods Documentation

addOutput(ref)

Add an output DatasetRef to the Quantum.

This does not automatically update a Registry; all outputs must be present before a Registry.addQuantum() is called.

Parameters:
ref : DatasetRef

Reference for a Dataset to add to the Quantum’s outputs.

addPredictedInput(ref)

Add an input DatasetRef to the Quantum.

This does not automatically update a Registry; all predictedInputs must be present before a Registry.addQuantum() is called.

Parameters:
ref : DatasetRef

Reference for a Dataset to add to the Quantum’s predicted inputs.