ProcessBrightStarsConnections#
- class lsst.pipe.tasks.processBrightStars.ProcessBrightStarsConnections(*, config: PipelineTaskConfig | None = None)#
Bases:
PipelineTaskConnectionsConnections for ProcessBrightStarsTask.
Attributes Summary
Mapping holding all connection attributes.
Connection for output dataset.
Set of dimension names that define the unit of work for this task.
Set with the names of all
InitInputconnection attributes.Set with the names of all
InitOutputconnection attributes.Class used for declaring PipelineTask input connections.
Set with the names of all
connectionTypes.Inputconnection attributes.Set with the names of all
Outputconnection attributes.Set with the names of all
PrerequisiteInputconnection attributes.Class used for declaring PipelineTask prerequisite connections.
Class used for declaring PipelineTask input connections.
Attributes Documentation
- allConnections: Mapping[str, BaseConnection] = {'brightStarStamps': Output(name='brightStarStamps', storageClass='BrightStarStamps', doc='Set of preprocessed postage stamps, each centered on a single bright star.', multiple=False, deprecated=None, _deprecation_context='', dimensions=('visit', 'detector'), isCalibration=False), 'inputExposure': Input(name='calexp', storageClass='ExposureF', doc='Input exposure from which to extract bright star stamps.', multiple=False, deprecated=None, _deprecation_context='', dimensions=('visit', 'detector'), isCalibration=False, deferLoad=False, minimum=1, deferGraphConstraint=False, deferBinding=False), 'refCat': PrerequisiteInput(name='gaia_dr3_20230707', storageClass='SimpleCatalog', doc='Reference catalog that contains bright star positions', multiple=True, deprecated=None, _deprecation_context='', dimensions=('skypix',), isCalibration=False, deferLoad=True, minimum=1, lookupFunction=None), 'skyCorr': Input(name='skyCorr', storageClass='Background', doc='Input sky correction to be subtracted from the calexp if doApplySkyCorr=True.', multiple=False, deprecated=None, _deprecation_context='', dimensions=('instrument', 'visit', 'detector'), isCalibration=False, deferLoad=False, minimum=1, deferGraphConstraint=False, deferBinding=False)}#
Mapping holding all connection attributes.
This is a read-only view that is automatically updated when connection attributes are added, removed, or replaced in
__init__. It is also updated after__init__completes to reflect changes ininputs,prerequisiteInputs,outputs,initInputs, andinitOutputs.
- brightStarStamps#
Connection for output dataset.
- defaultTemplates = {}#
- deprecatedTemplates = {}#
- dimensions: set[str] = {'detector', 'instrument', 'visit'}#
Set of dimension names that define the unit of work for this task.
Required and implied dependencies will automatically be expanded later and need not be provided.
This may be replaced or modified in
__init__to change the dimensions of the task. After__init__it will be afrozensetand may not be replaced.
- initInputs: set[str] = frozenset({})#
Set with the names of all
InitInputconnection attributes.See
inputsfor additional information.
- initOutputs: set[str] = frozenset({})#
Set with the names of all
InitOutputconnection attributes.See
inputsfor additional information.
- inputExposure#
Class used for declaring PipelineTask input connections.
Attributes#
- 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 implementPipelineTaskConnections.adjustQuantumto ensure those datasets are consistent (i.e. zip-iterable) inPipelineTask.runQuantumand notify the execution system as early as possible of outputs that will not be produced because the corresponding input is missing.- dimensionsiterable of
str The
lsst.daf.butler.Butlerlsst.daf.butler.Registrydimensions 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.- minimum
bool Minimum number of datasets required for this connection, per quantum. This is checked in the base implementation of
PipelineTaskConnections.adjustQuantum, which raisesNoWorkFoundif the minimum is not met forInputconnections (causing the quantum to be pruned, skipped, or never created, depending on the context), andFileNotFoundErrorforPrerequisiteInputconnections (causing QuantumGraph generation to fail).PipelineTaskimplementations may provide customadjustQuantumimplementations for more fine-grained or configuration-driven constraints, as long as they are compatible with this minium.- deferGraphConstraint
bool, optional If
True, do not include this dataset type’s existence in the initial query that starts the QuantumGraph generation process. This can be used to make QuantumGraph generation faster by avoiding redundant datasets, and in certain cases it can (along with careful attention to which tasks are included in the same QuantumGraph) be used to work around the QuantumGraph generation algorithm’s inflexible handling of spatial overlaps. This option has no effect when the connection is not an overall input of the pipeline (or subset thereof) for which a graph is being created, and it never affects the ordering of quanta.- deferBinding
bool, optional If
True, the dataset will not be automatically included in the pipeline graph,deferGraphConstraintis implied. The custom QuantumGraphBuilder is required to bind it and add a corresponding edge to the pipeline graph. This option allows to have the same dataset type as both input and output of a quantum.
Raises#
- TypeError
Raised if
minimumis greater than one butmultiple=False.- NotImplementedError
Raised if
minimumis zero for a regularInputconnection; this is not currently supported by our QuantumGraph generation algorithm.
- name
- inputs: set[str] = frozenset({'inputExposure', 'skyCorr'})#
Set with the names of all
connectionTypes.Inputconnection attributes.This is updated automatically as class attributes are added, removed, or replaced in
__init__. Removing entries from this set will cause those connections to be removed after__init__completes, but this is supported only for backwards compatibility; new code should instead just delete the collection attributed directly. After__init__this will be afrozensetand may not be replaced.
- outputs: set[str] = frozenset({'brightStarStamps'})#
Set with the names of all
Outputconnection attributes.See
inputsfor additional information.
- prerequisiteInputs: set[str] = frozenset({'refCat'})#
Set with the names of all
PrerequisiteInputconnection attributes.See
inputsfor additional information.
- refCat#
Class used for declaring PipelineTask prerequisite connections.
Attributes#
- 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 implementPipelineTaskConnections.adjustQuantumto ensure those datasets are consistent (i.e. zip-iterable) inPipelineTask.runQuantumand notify the execution system as early as possible of outputs that will not be produced because the corresponding input is missing.- dimensionsiterable of
str The
lsst.daf.butler.Butlerlsst.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 raisesFileNotFoundError(causing QuantumGraph generation to fail).PipelineTaskimplementations may provide customadjustQuantumimplementations 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 butmultiple=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).
- name
- skyCorr#
Class used for declaring PipelineTask input connections.
Attributes#
- 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 implementPipelineTaskConnections.adjustQuantumto ensure those datasets are consistent (i.e. zip-iterable) inPipelineTask.runQuantumand notify the execution system as early as possible of outputs that will not be produced because the corresponding input is missing.- dimensionsiterable of
str The
lsst.daf.butler.Butlerlsst.daf.butler.Registrydimensions 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.- minimum
bool Minimum number of datasets required for this connection, per quantum. This is checked in the base implementation of
PipelineTaskConnections.adjustQuantum, which raisesNoWorkFoundif the minimum is not met forInputconnections (causing the quantum to be pruned, skipped, or never created, depending on the context), andFileNotFoundErrorforPrerequisiteInputconnections (causing QuantumGraph generation to fail).PipelineTaskimplementations may provide customadjustQuantumimplementations for more fine-grained or configuration-driven constraints, as long as they are compatible with this minium.- deferGraphConstraint
bool, optional If
True, do not include this dataset type’s existence in the initial query that starts the QuantumGraph generation process. This can be used to make QuantumGraph generation faster by avoiding redundant datasets, and in certain cases it can (along with careful attention to which tasks are included in the same QuantumGraph) be used to work around the QuantumGraph generation algorithm’s inflexible handling of spatial overlaps. This option has no effect when the connection is not an overall input of the pipeline (or subset thereof) for which a graph is being created, and it never affects the ordering of quanta.- deferBinding
bool, optional If
True, the dataset will not be automatically included in the pipeline graph,deferGraphConstraintis implied. The custom QuantumGraphBuilder is required to bind it and add a corresponding edge to the pipeline graph. This option allows to have the same dataset type as both input and output of a quantum.
Raises#
- TypeError
Raised if
minimumis greater than one butmultiple=False.- NotImplementedError
Raised if
minimumis zero for a regularInputconnection; this is not currently supported by our QuantumGraph generation algorithm.
- name