lsst.pipe.base  19.0.0-18-gfb21c91+3
Public Member Functions | Public Attributes | List of all members
lsst.pipe.base.graph.QuantumGraph Class Reference
Inheritance diagram for lsst.pipe.base.graph.QuantumGraph:

Public Member Functions

def __init__ (self, iterable=None)
 
def quanta (self)
 
def quantaAsQgraph (self)
 
def countQuanta (self)
 
def traverse (self)
 

Public Attributes

 initInputs
 
 initIntermediates
 
 initOutputs
 

Detailed Description

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.

Definition at line 120 of file graph.py.

Constructor & Destructor Documentation

◆ __init__()

def lsst.pipe.base.graph.QuantumGraph.__init__ (   self,
  iterable = None 
)

Definition at line 132 of file graph.py.

Member Function Documentation

◆ countQuanta()

def lsst.pipe.base.graph.QuantumGraph.countQuanta (   self)
Return total count of quanta in a graph.

Returns
-------
count : `int`
    Number of quanta in a graph.

Definition at line 191 of file graph.py.

◆ quanta()

def lsst.pipe.base.graph.QuantumGraph.quanta (   self)
Iterator over quanta in a graph.

Quanta are returned in unspecified order.

Yields
------
taskDef : `TaskDef`
    Task definition for a Quantum.
quantum : `~lsst.daf.butler.Quantum`
    Single quantum.

Definition at line 159 of file graph.py.

◆ quantaAsQgraph()

def lsst.pipe.base.graph.QuantumGraph.quantaAsQgraph (   self)
Iterator over quanta in a graph.

QuantumGraph containing individual quanta are returned.

Yields
------
graph : `QuantumGraph`

Definition at line 176 of file graph.py.

◆ traverse()

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`

Definition at line 201 of file graph.py.

Member Data Documentation

◆ initInputs

lsst.pipe.base.graph.QuantumGraph.initInputs

Definition at line 134 of file graph.py.

◆ initIntermediates

lsst.pipe.base.graph.QuantumGraph.initIntermediates

Definition at line 135 of file graph.py.

◆ initOutputs

lsst.pipe.base.graph.QuantumGraph.initOutputs

Definition at line 136 of file graph.py.


The documentation for this class was generated from the following file: