output_quantities¶
-
lsst.verify.output_quantities(package_name, quantities, suffix=None, include_metrics=False, metrics_package='verify_metrics')[source]¶ Output measurements, as
astropy.units.Quantityobjects, from a pipeline task execution to alsst.verify-formatted JSON file.Parameters: package_name :
strName of the package producing measurements. This name is used two ways:
- Make fully-qualified metric names from keys in the
quantitiesdictionary. For example, if aquantitiesdict has a key-value pair{'PA1': 5 * u.mmag}andpackage_name='validate_drp', the fully-qualified metric name is'validate_drp.PA1'. - As a filename prefix for the output JSON file.
quantities :
dictofastropy.units.QuantityvaluesDictionary of measurements as plain
astropy.units.Quantityinstances. Each key is the name of a metric. If metric names are not fully-specified (inpackage.metricformat), the package name can be provided with thepackage_nameargument.suffix :
str, optionalAdditional suffix to add to the output JSON filename:
{package_name}_{suffix}.verify.json
The suffix may be used to distinguish measurement output files from different tasks in the same package.
include_metrics :
bool, optionalMetric and specification definitions are included in the JSON output if set to
True. The metric and specification definitions are loaded from a metric package indicated by themetrics_packageargument. Normally tasks do not need to include metric definitions if a post-processing step is used. Default:False.metrics_package :
str, optionalName of the metrics package to obtain metrics from if
include_metricsisTrue. Default is'verify_metrics'.Returns: filename :
strFilename where the JSON file was written.
See also
Notes
This function is designed for lightweight
lsst.verifyframework usage. Rather than maintainingJobandMeasurementobjects, a task can simply record metric measurements asastropy.units.Quantityobjects. Withoutput_quantities, the task can output these measurements in a standardizedlsst.verifyJSON format. Post-processing tools can load this data for local analysis, or submit it to the https://squash.lsst.codes dashboard service.Tasks that need to include
Blobs,Measurement.extrasor queryMetricobjects should create aJobinstance and useJob.writeinstead.- Make fully-qualified metric names from keys in the