AssembleCoaddConnections¶
-
class
lsst.pipe.tasks.assembleCoadd.
AssembleCoaddConnections
(*, config=None)¶ Bases:
lsst.pipe.base.PipelineTaskConnections
Attributes Summary
allConnections
brightObjectMask
Class used for declaring PipelineTask prerequisite connections coaddExposure
defaultTemplates
dimensions
initInputs
initOutputs
inputMap
inputWarps
inputs
nImage
outputs
prerequisiteInputs
selectedVisits
skyMap
Methods Summary
adjustQuantum
(datasetRefMap, …)Override to make adjustments to lsst.daf.butler.DatasetRef
objects in thelsst.daf.butler.core.Quantum
during the graph generation stage of the activator.buildDatasetRefs
(quantum)Builds QuantizedConnections corresponding to input Quantum Attributes Documentation
-
allConnections
= {'brightObjectMask': PrerequisiteInput(name='brightObjectMask', storageClass='ObjectMaskCatalog', doc='Input Bright Object Mask mask produced with external catalogs to be applied to the mask plane BRIGHT_OBJECT.', multiple=False, dimensions=('tract', 'patch', 'skymap', 'band'), isCalibration=False, deferLoad=False, lookupFunction=None), 'coaddExposure': Output(name='{outputCoaddName}Coadd{warpTypeSuffix}', storageClass='ExposureF', doc='Output coadded exposure, produced by stacking input warps', multiple=False, dimensions=('tract', 'patch', 'skymap', 'band'), isCalibration=False), 'inputMap': Output(name='{outputCoaddName}Coadd_inputMap', storageClass='HealSparseMap', doc='Output healsparse map of input images', multiple=False, dimensions=('tract', 'patch', 'skymap', 'band'), isCalibration=False), 'inputWarps': Input(name='{inputCoaddName}Coadd_{warpType}Warp', storageClass='ExposureF', doc='Input list of warps to be assemebled i.e. stacked.WarpType (e.g. direct, psfMatched) is controlled by the warpType config parameter', multiple=True, dimensions=('tract', 'patch', 'skymap', 'visit', 'instrument'), isCalibration=False, deferLoad=True), 'nImage': Output(name='{outputCoaddName}Coadd_nImage', storageClass='ImageU', doc='Output image of number of input images per pixel', multiple=False, dimensions=('tract', 'patch', 'skymap', 'band'), isCalibration=False), 'selectedVisits': Input(name='{outputCoaddName}Visits', storageClass='StructuredDataDict', doc='Selected visits to be coadded.', multiple=False, dimensions=('instrument', 'tract', 'patch', 'skymap', 'band'), isCalibration=False, deferLoad=False), 'skyMap': Input(name='skyMap', storageClass='SkyMap', doc='Input definition of geometry/bbox and projection/wcs for coadded exposures', multiple=False, dimensions=('skymap',), isCalibration=False, deferLoad=False)}¶
-
brightObjectMask
¶ 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
- dimensions : iterable of
str
The
lsst.daf.butler.Butler
lsst.daf.butler.Registry
dimensions used to identify the dataset type identified by the specified name- deferLoad :
bool
Indicates that this dataset type will be loaded as a
lsst.daf.butler.DeferredDatasetHandle
. PipelineTasks can use this object to load the object at a later time.- 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.
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
Input
connections:- The query used to find them then during
QuantumGraph
generation can be fully customized by providing alookupFunction
. - Failed searches for prerequisites during
QuantumGraph
generation will usually generate more helpful diagnostics than those for regularInput
connections. - 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
Input
connections cannot do at present) and to work aroundQuantumGraph
generation 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).
- name :
-
coaddExposure
¶
-
defaultTemplates
= {'inputCoaddName': 'deep', 'outputCoaddName': 'deep', 'warpType': 'direct', 'warpTypeSuffix': ''}¶
-
dimensions
= {'tract', 'skymap', 'band', 'patch'}¶
-
initInputs
= frozenset()¶
-
initOutputs
= frozenset()¶
-
inputMap
¶
-
inputWarps
¶
-
inputs
= frozenset({'inputWarps', 'selectedVisits', 'skyMap'})¶
-
nImage
¶
-
outputs
= frozenset({'inputMap', 'coaddExposure', 'nImage'})¶
-
prerequisiteInputs
= frozenset({'brightObjectMask'})¶
-
selectedVisits
¶
-
skyMap
¶
Methods Documentation
-
adjustQuantum
(datasetRefMap: lsst.daf.butler.core.named.NamedKeyDict[lsst.daf.butler.core.datasets.type.DatasetType, typing.Set[lsst.daf.butler.core.datasets.ref.DatasetRef]][lsst.daf.butler.core.datasets.type.DatasetType, Set[lsst.daf.butler.core.datasets.ref.DatasetRef]]) → lsst.daf.butler.core.named.NamedKeyDict[lsst.daf.butler.core.datasets.type.DatasetType, typing.Set[lsst.daf.butler.core.datasets.ref.DatasetRef]][lsst.daf.butler.core.datasets.type.DatasetType, Set[lsst.daf.butler.core.datasets.ref.DatasetRef]]¶ Override to make adjustments to
lsst.daf.butler.DatasetRef
objects in thelsst.daf.butler.core.Quantum
during the graph generation stage of the activator.The base class implementation simply checks that input connections with
multiple
set toFalse
have no more than one dataset.Parameters: - datasetRefMap :
NamedKeyDict
Mapping from dataset type to a
set
oflsst.daf.butler.DatasetRef
objects
Returns: - datasetRefMap :
NamedKeyDict
Modified mapping of input with possibly adjusted
lsst.daf.butler.DatasetRef
objects.
Raises: - ScalarError
Raised if any
Input
orPrerequisiteInput
connection hasmultiple
set toFalse
, but multiple datasets.- Exception
Overrides of this function have the option of raising an Exception if a field in the input does not satisfy a need for a corresponding pipelineTask, i.e. no reference catalogs are found.
- datasetRefMap :
-
buildDatasetRefs
(quantum: lsst.daf.butler.core.quantum.Quantum) → Tuple[lsst.pipe.base.connections.InputQuantizedConnection, lsst.pipe.base.connections.OutputQuantizedConnection]¶ Builds QuantizedConnections corresponding to input Quantum
Parameters: - quantum :
lsst.daf.butler.Quantum
Quantum object which defines the inputs and outputs for a given unit of processing
Returns: - retVal :
tuple
of (InputQuantizedConnection
, OutputQuantizedConnection
) Namespaces mapping attribute names (identifiers of connections) to butler references defined in the inputlsst.daf.butler.Quantum
- quantum :
-