PrerequisiteFinder¶
- class lsst.pipe.base.prerequisite_helpers.PrerequisiteFinder(edge: ReadEdge, bounds: PrerequisiteBounds, pipeline_graph: PipelineGraph)¶
Bases:
objectA QuantumGraph-generation helper class that manages the searches for a prerequisite input connection.
- Parameters:
- edge
pipeline_graph.ReadEdge A
PipelineGraphedge that represents a single prerequisite input connection.- bounds
PrerequisiteBounds Another helper object that manages the spatial/temporal bounds of the task’s quanta, shared by all prerequisite inputs for that task.
- pipeline_graph `pipeline_graph.PipelineGraph`
Graph representation of the pipeline.
- edge
Notes
PrerequisiteFinderinstances are usually constructed by aPrerequisiteInfoinstance, which is in turn constructed by and attached to the baseQuantumGraphBuilderwhen a new builder is constructed. During theQuantumGraphBuilder.process_subgraphhook implemented by a builder subclass, prerequisite inputs may be found in other ways (e.g. via bulk queries), as long as the results are consistent with the finder’s attributes, and this is indicated to the baseQuantumGraphBuilderby removing those finder instances after those prerequisites have been found and added to aQuantumGraphSkeleton. Finder instances that remain in the builder are used by callingPrerequisiteFinder.findon each quantum later inQuantumGraphBuilder.build.Attributes Summary
The
PipelineGraphnode that represents the task for this connection.Methods Summary
find(butler, input_collections, data_id, ...)Find prerequisite input datasets for a single quantum.
Attributes Documentation
- task_node¶
The
PipelineGraphnode that represents the task for this connection.
Methods Documentation
- find(butler: Butler, input_collections: Sequence[str], data_id: DataCoordinate, skypix_bounds: Mapping[str, RangeSet], timespan: Timespan | None) list[lsst.daf.butler._dataset_ref.DatasetRef]¶
Find prerequisite input datasets for a single quantum.
- Parameters:
- butler
lsst.daf.butler.Butler Butler client to use for queries.
- input_collections
Sequence[str] Sequence of collections to search, in order.
- data_id
lsst.daf.butler.DataCoordinate Data ID for the quantum.
- skypix_bounds
Mapping[str,lsst.sphgeom.RangeSet] The spatial bounds of this quantum in various skypix dimensions. Keys are skypix dimension names (a superset of those in
dataset_skypix) and values are sets of integer pixel ID ranges.- timespan
lsst.daf.butler.TimespanorNone The temporal bounds of this quantum. Guaranteed to not be
Noneifdataset_has_timespanisTrue.
- butler
- Returns:
- refs
list[lsst.daf.butler.DatasetRef] Dataset references. These use
self.dataset_type_node.dataset_type, which may differ from the connection’s dataset type in storage class or [lack of] component.
- refs
- Raises:
- NotImplementedError
Raised for certain relationships between task and dataset type dimensions that are possible to define but not believed to be useful in practice. These errors occur late rather than early in order to allow a
QuantumGraphBuildersubclass to handle them first, in case an unusual task’s needs must be met by a custom builder class anyway.