PrerequisiteInput¶
- 
class lsst.pipe.base.connectionTypes.PrerequisiteInput(name: str, storageClass: str, doc: str = '', multiple: bool = False, dimensions: Iterable[str] = (), isCalibration: bool = False, deferLoad: bool = False, minimum: int = 1, lookupFunction: Optional[Callable[[lsst.daf.butler.core.datasets.type.DatasetType, lsst.daf.butler.registry._registry.Registry, lsst.daf.butler.core.dimensions._coordinate.DataCoordinate, lsst.daf.butler.registry.wildcards.CollectionSearch], Iterable[lsst.daf.butler.core.datasets.ref.DatasetRef]]] = None)¶
- Bases: - lsst.pipe.base.connectionTypes.BaseInput- Class used for declaring PipelineTask prerequisite connections - Parameters: - name : str
- The default name used to identify the dataset type 
- storageClass : str
- The storage class used when (un)/persisting the dataset type 
- multiple : bool
- Indicates if this connection should expect to contain multiple objects of the given dataset type. Tasks with more than one connection with - multiple=Truewith the same dimensions may want to implement- PipelineTaskConnections.adjustQuantumto ensure those datasets are consistent (i.e. zip-iterable) in- PipelineTask.runQuantumand notify the execution system as early as possible of outputs that will not be produced because the corresponding input is missing.
- dimensions : iterable of str
- The - lsst.daf.butler.Butler- lsst.daf.butler.Registrydimensions used to identify the dataset type identified by the specified name
- minimum : bool
- Minimum number of datasets required for this connection, per quantum. This is checked in the base implementation of - PipelineTaskConnections.adjustQuantum, which raises- FileNotFoundError(causing QuantumGraph generation to fail).- PipelineTaskimplementations may provide custom- adjustQuantumimplementations for more fine-grained or configuration-driven constraints, as long as they are compatible with this minium.
- lookupFunction: `typing.Callable`, optional
- An optional callable function that will look up PrerequisiteInputs using the DatasetType, registry, quantum dataId, and input collections passed to it. If no function is specified, the default temporal spatial lookup will be used. 
 - Raises: - TypeError
- Raised if - minimumis greater than one but- multiple=False.
 - Notes - Prerequisite inputs are used for datasets that must exist in the data repository before a pipeline including this is run; they cannot be produced by another task in the same pipeline. - In exchange for this limitation, they have a number of advantages relative to regular - Inputconnections:- The query used to find them then during QuantumGraphgeneration can be fully customized by providing alookupFunction.
- Failed searches for prerequisites during QuantumGraphgeneration will usually generate more helpful diagnostics than those for regularInputconnections.
- The default query for prerequisite inputs relates the quantum dimensions
directly to the dimensions of its dataset type, without being constrained
by any of the other dimensions in the pipeline.  This allows them to be
used for temporal calibration lookups (which regular Inputconnections cannot do at present) and to work aroundQuantumGraphgeneration limitations involving cases where naive spatial overlap relationships between dimensions are not desired (e.g. a task that wants all detectors in each visit for which the visit overlaps a tract, not just those where that detector+visit combination overlaps the tract).
- Prerequisite inputs may be optional (regular inputs are never optional).
 - Attributes Summary - deferLoad- dimensions- doc- isCalibration- lookupFunction- minimum- multiple- Methods Summary - makeDatasetType(universe, …)- Construct a true - DatasetTypeinstance with normalized dimensions.- Attributes Documentation - 
deferLoad= False¶
 - 
dimensions= ()¶
 - 
doc= ''¶
 - 
isCalibration= False¶
 - 
lookupFunction= None¶
 - 
minimum= 1¶
 - 
multiple= False¶
 - Methods Documentation - 
makeDatasetType(universe: lsst.daf.butler.core.dimensions._universe.DimensionUniverse, parentStorageClass: Union[lsst.daf.butler.core.storageClass.StorageClass, str, None] = None) → lsst.daf.butler.core.datasets.type.DatasetType¶
- Construct a true - DatasetTypeinstance with normalized dimensions.- Parameters: - universe : lsst.daf.butler.DimensionUniverse
- Set of all known dimensions to be used to normalize the dimension names specified in config. 
- parentStorageClass : lsst.daf.butler.StorageClassorstr, optional
- Parent storage class for component datasets; - Noneotherwise.
 - Returns: - datasetType : DatasetType
- The - DatasetTypedefined by this connection.
 
- universe : 
 
- name :