LSST Applications
22.0.1,22.0.1+01bcf6a671,22.0.1+046ee49490,22.0.1+05c7de27da,22.0.1+0c6914dbf6,22.0.1+1220d50b50,22.0.1+12fd109e95,22.0.1+1a1dd69893,22.0.1+1c910dc348,22.0.1+1ef34551f5,22.0.1+30170c3d08,22.0.1+39153823fd,22.0.1+611137eacc,22.0.1+771eb1e3e8,22.0.1+94e66cc9ed,22.0.1+9a075d06e2,22.0.1+a5ff6e246e,22.0.1+a7db719c1a,22.0.1+ba0d97e778,22.0.1+bfe1ee9056,22.0.1+c4e1e0358a,22.0.1+cc34b8281e,22.0.1+d640e2c0fa,22.0.1+d72a2e677a,22.0.1+d9a6b571bd,22.0.1+e485e9761b,22.0.1+ebe8d3385e
LSST Data Management Base Package
|
Public Member Functions | |
def | __init__ (self, pipeline, *registry) |
def | __repr__ (self) |
def | connectDataIds (self, registry, collections, userQuery, externalDataId) |
def | resolveDatasetRefs (self, registry, collections, run, commonDataIds, *skipExisting=True) |
def | makeQuantumGraph (self) |
Public Attributes | |
tasks | |
dimensions | |
A helper data structure that organizes the information involved in constructing a `QuantumGraph` for a `Pipeline`. Parameters ---------- pipeline : `Pipeline` Sequence of tasks from which a graph is to be constructed. Must have nested task classes already imported. universe : `DimensionUniverse` Universe of all possible dimensions. Notes ----- The scaffolding data structure contains nested data structures for both tasks (`_TaskScaffolding`) and datasets (`_DatasetDict`). The dataset data structures are shared between the pipeline-level structure (which aggregates all datasets and categorizes them from the perspective of the complete pipeline) and the individual tasks that use them as inputs and outputs. `QuantumGraph` construction proceeds in four steps, with each corresponding to a different `_PipelineScaffolding` method: 1. When `_PipelineScaffolding` is constructed, we extract and categorize the DatasetTypes used by the pipeline (delegating to `PipelineDatasetTypes.fromPipeline`), then use these to construct the nested `_TaskScaffolding` and `_DatasetDict` objects. 2. In `connectDataIds`, we construct and run the "Big Join Query", which returns related tuples of all dimensions used to identify any regular input, output, and intermediate datasets (not prerequisites). We then iterate over these tuples of related dimensions, identifying the subsets that correspond to distinct data IDs for each task and dataset type, and then create `_QuantumScaffolding` objects. 3. In `resolveDatasetRefs`, we run follow-up queries against all of the dataset data IDs previously identified, transforming unresolved DatasetRefs into resolved DatasetRefs where appropriate. We then look up prerequisite datasets for all quanta. 4. In `makeQuantumGraph`, we construct a `QuantumGraph` from the lists of per-task `_QuantumScaffolding` objects.
Definition at line 357 of file graphBuilder.py.
def lsst.pipe.base.graphBuilder._PipelineScaffolding.__init__ | ( | self, | |
pipeline, | |||
* | registry | ||
) |
Definition at line 401 of file graphBuilder.py.
def lsst.pipe.base.graphBuilder._PipelineScaffolding.__repr__ | ( | self | ) |
Definition at line 428 of file graphBuilder.py.
def lsst.pipe.base.graphBuilder._PipelineScaffolding.connectDataIds | ( | self, | |
registry, | |||
collections, | |||
userQuery, | |||
externalDataId | |||
) |
Query for the data IDs that connect nodes in the `QuantumGraph`. This method populates `_TaskScaffolding.dataIds` and `_DatasetScaffolding.dataIds` (except for those in `prerequisites`). Parameters ---------- registry : `lsst.daf.butler.Registry` Registry for the data repository; used for all data ID queries. collections Expressions representing the collections to search for input datasets. May be any of the types accepted by `lsst.daf.butler.CollectionSearch.fromExpression`. userQuery : `str` or `None` User-provided expression to limit the data IDs processed. externalDataId : `DataCoordinate` Externally-provided data ID that should be used to restrict the results, just as if these constraints had been included via ``AND`` in ``userQuery``. This includes (at least) any instrument named in the pipeline definition. Returns ------- commonDataIds : \ `lsst.daf.butler.registry.queries.DataCoordinateQueryResults` An interface to a database temporary table containing all data IDs that will appear in this `QuantumGraph`. Returned inside a context manager, which will drop the temporary table at the end of the `with` block in which this method is called.
Definition at line 482 of file graphBuilder.py.
def lsst.pipe.base.graphBuilder._PipelineScaffolding.makeQuantumGraph | ( | self | ) |
Create a `QuantumGraph` from the quanta already present in the scaffolding data structure. Returns ------- graph : `QuantumGraph` The full `QuantumGraph`.
Definition at line 755 of file graphBuilder.py.
def lsst.pipe.base.graphBuilder._PipelineScaffolding.resolveDatasetRefs | ( | self, | |
registry, | |||
collections, | |||
run, | |||
commonDataIds, | |||
* | skipExisting = True |
||
) |
Perform follow up queries for each dataset data ID produced in `fillDataIds`. This method populates `_DatasetScaffolding.refs` (except for those in `prerequisites`). Parameters ---------- registry : `lsst.daf.butler.Registry` Registry for the data repository; used for all data ID queries. collections Expressions representing the collections to search for input datasets. May be any of the types accepted by `lsst.daf.butler.CollectionSearch.fromExpression`. run : `str`, optional Name of the `~lsst.daf.butler.CollectionType.RUN` collection for output datasets, if it already exists. commonDataIds : \ `lsst.daf.butler.registry.queries.DataCoordinateQueryResults` Result of a previous call to `connectDataIds`. skipExisting : `bool`, optional If `True` (default), a Quantum is not created if all its outputs already exist in ``run``. Ignored if ``run`` is `None`. Raises ------ OutputExistsError Raised if an output dataset already exists in the output run and ``skipExisting`` is `False`. The case where some but not all of a quantum's outputs are present and ``skipExisting`` is `True` cannot be identified at this stage, and is handled by `fillQuanta` instead.
Definition at line 577 of file graphBuilder.py.
lsst.pipe.base.graphBuilder._PipelineScaffolding.dimensions |
Definition at line 415 of file graphBuilder.py.
lsst.pipe.base.graphBuilder._PipelineScaffolding.tasks |
Definition at line 403 of file graphBuilder.py.