mt_metadata icon indicating copy to clipboard operation
mt_metadata copied to clipboard

Sanity checks for metadata parameters

Open kkappler opened this issue 4 years ago • 3 comments

Working on CAS04 test dataset for aurora I encountered the following filter:

{ "coefficient_filter": { "calibration_date": "1980-01-01", "comments": "analog to digital conversion", "gain": 484733700000000.0, "name": "v to counts (electric)", "type": "coefficient", "units_in": "V", "units_out": "count" } },

The ADC gain is impossibly large. Maybe some checks at ingest can be added.

kkappler avatar Aug 28 '21 23:08 kkappler

I think that we've figure this out, but maybe a warning would be in store if something is too large.

kujaku11 avatar Nov 01 '21 23:11 kujaku11

@kkappler What would be too large? Would you check for units, like make sure that its a calibration from counts to units first, then check the scale of the gain?

kujaku11 avatar Nov 23 '21 06:11 kujaku11

Id suggest for now that greater than 2^32 should get a warning.

Most systems are 24 bit but there are 32 bit out there, so total number of available counts ~(2^n-1) where n is number of bits, n=32 max (today). The range of admitted voltages I'm not as sure but some coils can output a few volts.

i.e. 2^32 > 2^32/a_few_volts

2^32/a_few_volts is about as large a cpv factor I would expect.

kkappler avatar Nov 24 '21 03:11 kkappler