MetricConnections#

class lsst.verify.tasks.MetricConnections(*, config: PipelineTaskConfig | None = None)#

Bases: PipelineTaskConnections

An abstract connections class defining a metric output.

This class assumes detector-level metrics, which is the most common case. Subclasses can redeclare measurement and dimensions to override this assumption.

Notes#

MetricConnections defines the following dataset templates:
package

Name of the metric’s namespace. By verify_metrics convention, this is the name of the package the metric is most closely associated with.

metric

Name of the metric, excluding any namespace.

Attributes Summary

allConnections

Mapping holding all connection attributes.

defaultTemplates

deprecatedTemplates

dimensions

Set of dimension names that define the unit of work for this task.

initInputs

Set with the names of all InitInput connection attributes.

initOutputs

Set with the names of all InitOutput connection attributes.

inputs

Set with the names of all connectionTypes.Input connection attributes.

measurement

Connection for output dataset.

outputs

Set with the names of all Output connection attributes.

prerequisiteInputs

Set with the names of all PrerequisiteInput connection attributes.

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', 'visit', 'detector'}, isCalibration=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 in inputs, prerequisiteInputs, outputs, initInputs, and initOutputs.

defaultTemplates = {'metric': None, 'package': None}#
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 a frozenset and may not be replaced.

initInputs: set[str] = frozenset({})#

Set with the names of all InitInput connection attributes.

See inputs for additional information.

initOutputs: set[str] = frozenset({})#

Set with the names of all InitOutput connection attributes.

See inputs for additional information.

inputs: set[str] = frozenset({})#

Set with the names of all connectionTypes.Input connection 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 a frozenset and may not be replaced.

measurement#

Connection for output dataset.

outputs: set[str] = frozenset({'measurement'})#

Set with the names of all Output connection attributes.

See inputs for additional information.

prerequisiteInputs: set[str] = frozenset({})#

Set with the names of all PrerequisiteInput connection attributes.

See inputs for additional information.