ApdbMetricTask¶
ApdbMetricTask is a base class for generating Measurements from an Alert Production Database.
The class handles loading an appropriately configured database, while subclasses are responsible for creating the Measurement using the database API.
Processing summary¶
ApdbMetricTask runs this sequence of operations:
Load the dataset indicated by
dbInfo(default: one or moreapdb_markerdatasets).Generate an
Apdbobject by calling thedbLoadersubtask (default:DirectApdbLoader).Process the database by passing it to the customizable
makeMeasurementmethod, and return theMeasurement.
Python API summary¶
from lsst.verify.tasks.apdbMetricTask import ApdbMetricTask
-
class
ApdbMetricTask(**kwargs) A base class for tasks that compute metrics from an alert production database
...
- attributeconfig
Access configuration fields and retargetable subtasks.
See also
See the ApdbMetricTask API reference for complete details.
Butler datasets¶
Input datasets¶
dbInfoThe Butler dataset from which the database connection can be initialized. The type must match the input required by the
dbLoadersubtask (default:apdb_marker).
Output datasets¶
measurementThe value of the metric. The dataset type should not be configured directly, but should be set changing the
packageandmetrictemplate variables to the metric’s namespace (package, by convention) and in-package name, respectively. Subclasses that only support one metric should set these variables automatically.
Retargetable subtasks¶
dbLoader¶
- Default
- Field type
Task for loading a database from dbInfo. Its run method must take one object of the dataset type indicated by dbInfo and return a Struct with an ‘apdb’ member.
Configuration fields¶
connections¶
- Data type
lsst.pipe.base.config.ApdbMetricConfigConnections- Field type
Configurations describing the connections of the PipelineTask to datatypes
saveLogOutput¶
Flag to enable/disable saving of log output for a task, enabled by default.
saveMetadata¶
Flag to enable/disable metadata saving for a task, enabled by default. Deprecated: This field is deprecated and will be removed after v26.