Sanity checks for metadata parameters
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.
I think that we've figure this out, but maybe a warning would be in store if something is too large.
@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?
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.