CatalogMeasurementBaseConnections#
- class lsst.faro.base.CatalogMeasurementBaseConnections(*, config: PipelineTaskConfig | None = None)#
Bases:
MetricConnectionsAttributes Summary
Mapping holding all connection attributes.
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.Set with the names of all
connectionTypes.Inputconnection attributes.Connection for output dataset.
Set with the names of all
Outputconnection attributes.Set with the names of all
PrerequisiteInputconnection attributes.Class used for declaring PipelineTask prerequisite connections.
Attributes Documentation
- allConnections: Mapping[str, BaseConnection] = {'measurement': Output(name='metricvalue_{package}_{metric}', storageClass='MetricValue', doc='The metric value computed by this task.', multiple=False, deprecated=None, _deprecation_context='', dimensions={'instrument', 'detector', 'visit'}, isCalibration=False), 'refCat': PrerequisiteInput(name='{refDataset}', storageClass='SimpleCatalog', doc='Reference catalog', multiple=True, deprecated=None, _deprecation_context='', dimensions=('skypix',), isCalibration=False, deferLoad=True, minimum=1, lookupFunction=None)}#
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.
- defaultTemplates = {'metric': None, 'package': None, 'refDataset': ''}#
- 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.
- inputs: set[str] = frozenset({})#
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.
- measurement#
Connection for output dataset.
- outputs: set[str] = frozenset({'measurement'})#
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