# Enforce consistent units between validate_base metrics, specifications, and measurements

XMLWordPrintable

#### Details

• Type: Story
• Status: Won't Fix
• Resolution: Done
• Fix Version/s: None
• Component/s:
• Labels:
• Team:
SQuaRE

#### Description

Right now there's a bit too much flexibility in units, as output in JSON to SQUASH. The overall goal is to have a single canonical unit for a metric that all specification and measurement values in the SQUASH DB can refer to.

Design sketch:

• In the SQUASH DB, the unit for a metric is stored in the Metric table; measurements don’t have a unit, instead the unit is assumed to be the same as the metric definition. This is good for performance because all the units are normalized, and you don’t need to do real-time unit conversions for the regression plots.
• In validate_base and metrics.yaml docs, the Metric objects themselves have the unit, and specifications inherit that unit.
• Measurement objects in validate_base can be created with whatever object the user desires, but when JSON is rendered, it’s automatically normalized to the unit given in the metric definition. (This way post-qa won’t need to worry about unit conversion either)
• post-qa can still sanity check that the unit of a measurement matches the metric definition

#### Activity

Hide
Leanne Guy added a comment -

validate_drp is being replaced with faro. There will be no new development on validate_drp

Show
Leanne Guy added a comment - validate_drp is being replaced with faro. There will be no new development on validate_drp
Hide
Jonathan Sick added a comment -

Angelo Fausti, this isn't a relevant issue for squash right? I'm closing this ticket but we can re-open if necessary. It's ancient after all.

Show
Jonathan Sick added a comment - Angelo Fausti , this isn't a relevant issue for squash right? I'm closing this ticket but we can re-open if necessary. It's ancient after all.
Hide
Angelo Fausti added a comment -

Agreed. It doesn't look relevant anymore.

We define units in lsst.verify and they are saved in the Metrics table as well in the SQuaSH databse https://sqr-009.lsst.io/#the-squash-context-database.

Show
Angelo Fausti added a comment - Agreed. It doesn't look relevant anymore. We define units in lsst.verify and they are saved in the Metrics table as well in the SQuaSH databse https://sqr-009.lsst.io/#the-squash-context-database .

#### People

Assignee:
Jonathan Sick
Reporter:
Jonathan Sick
Watchers:
Angelo Fausti, Jonathan Sick, Leanne Guy