MetadataMetricTask

MetadataMetricTask is a base class for generating Measurements from task metadata. The class handles loading metadata and extracting the keys of interest, while subclasses are responsible for creating the Measurement from the extracted values.

MetadataMetricTask is currently a subclass of lsst.verify.gen2tasks.MetricTask. It is expected that MetadataMetricTask can be migrated to the Gen 3 framework without affecting its subclasses.

Processing summary

MetadataMetricTask runs this sequence of operations:

  1. Find the metadata key(s) needed to compute the metric by calling the customizable getInputMetadataKeys method.
  2. Search all the metadata objects passed to run for the keys, and extract the corresponding values.
  3. Process the values by calling the customizable makeMeasurement method, and return the Measurement.

Python API summary

from lsst.verify.tasks.metadataMetricTask import MetadataMetricTask
classMetadataMetricTask(**kwargs)

A base class for tasks that compute metrics from metadata values...

attributeconfig

Access configuration fields and retargetable subtasks.

methodrun(metadata)

Compute a measurement from science task metadata...

See also

See the MetadataMetricTask API reference for complete details.

Butler datasets

Input datasets

metadata
The metadata of the top-level command-line task (e.g., ProcessCcdTask, ApPipeTask) being instrumented. Because the metadata produced by each top-level task is a different Butler dataset type, this dataset must be explicitly configured when running MetadataMetricTask or a MetricsControllerTask that contains it.

Retargetable subtasks

No subtasks.

Configuration fields

metadata

Data type
lsst.pipe.base.config.InputDatasetConfig
Field type
ConfigField
The target top-level task’s metadata. The name must be set to the metadata’s butler type, such as ‘processCcd_metadata’.