PrerequisiteFinder¶
- class lsst.pipe.base.prerequisite_helpers.PrerequisiteFinder(edge: ReadEdge, bounds: PrerequisiteBounds, pipeline_graph: PipelineGraph)¶
- Bases: - object- A QuantumGraph-generation helper class that manages the searches for a prerequisite input connection. - Parameters:
- edgepipeline_graph.ReadEdge
- A - PipelineGraphedge that represents a single prerequisite input connection.
- boundsPrerequisiteBounds
- 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 a- PrerequisiteInfoinstance, which is in turn constructed by and attached to the base- QuantumGraphBuilderwhen a new builder is constructed. During the- QuantumGraphBuilder.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 base- QuantumGraphBuilderby removing those finder instances after those prerequisites have been found and added to a- QuantumGraphSkeleton. Finder instances that remain in the builder are used by calling- PrerequisiteFinder.findon each quantum later in- QuantumGraphBuilder.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.core.datasets.ref.DatasetRef]¶
- Find prerequisite input datasets for a single quantum. - Parameters:
- butlerlsst.daf.butler.Butler
- Butler client to use for queries. 
- input_collectionsSequence[str]
- Sequence of collections to search, in order. 
- data_idlsst.daf.butler.DataCoordinate
- Data ID for the quantum. 
- skypix_boundsMapping[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.
- timespanlsst.daf.butler.TimespanorNone
- The temporal bounds of this quantum. Guaranteed to not be - Noneif- dataset_has_timespanis- True.
 
- butler
- Returns:
- refslist[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.