lsst.validate.base — Metric measurement framework

lsst.validate.base is a framework for packages that measure software and data quality metrics. A metric can be any measurable scalar quantity; some examples are in the LSST Science Requirements Document (LPM-17), though packages can also define ad hoc metrics. Measurements made through lsst.validate.base can be uploaded to LSST’s SQUASH monitoring dashboard to help you see how code development affects performance.


lsst.validate.base helps you build packages that make and report measurements to SQUASH:

Python API reference

lsst.validate.base Package

Framework for measuring and defining performance metrics that can be submitted to the SQUASH service.


load_metrics(yaml_path) Load metric from a YAML document into an ordered dictionary of Metrics.


BlobBase() Base class for blobs: flexible containers of data that are serialized to JSON.
Datum([quantity, unit, label, description]) A value annotated with units, a plot label and description.
DeserializedBlob(name, id_, datums) A concrete Blob deserialized from JSON.
DeserializedMeasurement([quantity, id_, ...]) Measurement deserialized from JSON.
Job([measurements, blobs]) A Job wraps all measurements and blob metadata associated with a validation run.
MeasurementBase() Base class for Measurement classes.
Metric(name, description, operator_str[, ...]) Container for the definition of a metric and its specification levels.
QuantityAttributeMixin Mixin with common attributes for classes that wrap an astropy.units.Quantity.
Specification(name, quantity[, unit, ...]) A specification level, or threshold, associated with a Metric.
ValidateError Base error for validate_base.
ValidateSpecificationError Error accessing or using requirement specifications.

Class Inheritance Diagram

Inheritance diagram of lsst.validate.base.blob.BlobBase, lsst.validate.base.datum.Datum, lsst.validate.base.blob.DeserializedBlob, lsst.validate.base.measurement.DeserializedMeasurement, lsst.validate.base.job.Job, lsst.validate.base.measurement.MeasurementBase, lsst.validate.base.metric.Metric, lsst.validate.base.datum.QuantityAttributeMixin, lsst.validate.base.spec.Specification, lsst.validate.base.errors.ValidateError, lsst.validate.base.errors.ValidateSpecificationError

lsst.validate.base.jsonmixin Module


JsonSerializationMixin Mixin that provides JSON serialization support to subclasses.

lsst.validate.base.datummixin Module


DatumAttributeMixin Mixin that provides a Datum-like API to non-Datum classes.