lsst.pipe.base
19.0.0-24-g878c510+7
|
Public Member Functions | |
def | __init__ (self, iterable=None) |
def | load (cls, file, universe) |
def | save (self, file) |
def | quanta (self) |
def | quantaAsQgraph (self) |
def | countQuanta (self) |
def | traverse (self) |
Public Attributes | |
initInputs | |
initIntermediates | |
initOutputs | |
QuantumGraph is a sequence of `QuantumGraphTaskNodes` objects. Typically the order of the tasks in the list will be the same as the order of tasks in a pipeline (obviously depends on the code which constructs graph). Parameters ---------- iterable : iterable of `QuantumGraphTaskNodes`, optional Initial sequence of per-task nodes.
def lsst.pipe.base.graph.QuantumGraph.__init__ | ( | self, | |
iterable = None |
|||
) |
def lsst.pipe.base.graph.QuantumGraph.countQuanta | ( | self | ) |
def lsst.pipe.base.graph.QuantumGraph.load | ( | cls, | |
file, | |||
universe | |||
) |
Read QuantumGraph from a file that was made by `save`. Parameters ---------- file : `io.BufferedIOBase` File with pickle data open in binary mode. universe: `~lsst.daf.butler.DimensionUniverse` DimensionUniverse instance, not used by the method itself but needed to ensure that registry data structures are initialized. Returns ------- graph : `QuantumGraph` Resulting QuantumGraph instance. Raises ------ TypeError Raised if pickle contains instance of a type other than QuantumGraph. Notes ----- Reading Quanta from pickle requires existence of singleton DimensionUniverse which is usually instantiated during Registry initializaion. To make sure that DimensionUniverse exists this method accepts dummy DimensionUniverse argument.
def lsst.pipe.base.graph.QuantumGraph.quanta | ( | self | ) |
def lsst.pipe.base.graph.QuantumGraph.quantaAsQgraph | ( | self | ) |
def lsst.pipe.base.graph.QuantumGraph.save | ( | self, | |
file | |||
) |
def lsst.pipe.base.graph.QuantumGraph.traverse | ( | self | ) |
Return topologically ordered Quanta and their dependencies. This method iterates over all Quanta in topological order, enumerating them during iteration. Returned `QuantumIterData` object contains Quantum instance, its ``index`` and the ``index`` of all its prerequsites (Quanta that produce inputs for this Quantum): - the ``index`` values are generated by an iteration of a QuantumGraph, and are not intrinsic to the QuantumGraph - during iteration, each ID will appear in index before it ever appears in dependencies. Yields ------ quantumData : `QuantumIterData`