Context
Sabueso needed to store an uncertainty that a publication states around a measured quantity, for example "IC50 = 12 ± 3 nM (SD, n = 3)" or "Ki = 10 µM (95% CI 8–12 µM)" (uibcdf/sabueso#37). PyUnitWizard 0.27.0 has no representation for it, and a search of this repository's issues finds none. #83, the serialization design record, does not mention uncertainty.
What Sabueso did locally
normalized_uncertainty = {kind, half_width | lower, upper, level?, n?}:
kind is one of sd, sem, unspecified (a bare "±") or ci.
half_width, lower and upper are ordinary {value, unit} nodes in the measurement's unit, sealed in the card's QuantityRecordBundle as separate columns.
level is a fraction, for ci; n is the number of replicates.
It works, but the pairing of a value with its uncertainty lives only in Sabueso's schema. The bundle seals the numbers without knowing they belong together.
Suggestion
Consider whether PyUnitWizard should define how a quantity carries a stated uncertainty in QuantityRecord or the bundle: the kind of spread, a half-width or interval in the same dimensionality, a confidence level and the replicates. If it does, Sabueso would align its representation with it.
This is not a blocker. Sabueso's representation is recorded in its devguide/DECISIONS.md ("Ranges and stated uncertainty").
Context
Sabueso needed to store an uncertainty that a publication states around a measured quantity, for example "IC50 = 12 ± 3 nM (SD, n = 3)" or "Ki = 10 µM (95% CI 8–12 µM)" (uibcdf/sabueso#37). PyUnitWizard 0.27.0 has no representation for it, and a search of this repository's issues finds none. #83, the serialization design record, does not mention uncertainty.
What Sabueso did locally
normalized_uncertainty = {kind, half_width | lower, upper, level?, n?}:kindis one ofsd,sem,unspecified(a bare "±") orci.half_width,lowerandupperare ordinary{value, unit}nodes in the measurement's unit, sealed in the card'sQuantityRecordBundleas separate columns.levelis a fraction, forci;nis the number of replicates.It works, but the pairing of a value with its uncertainty lives only in Sabueso's schema. The bundle seals the numbers without knowing they belong together.
Suggestion
Consider whether PyUnitWizard should define how a quantity carries a stated uncertainty in
QuantityRecordor the bundle: the kind of spread, a half-width or interval in the same dimensionality, a confidence level and the replicates. If it does, Sabueso would align its representation with it.This is not a blocker. Sabueso's representation is recorded in its
devguide/DECISIONS.md("Ranges and stated uncertainty").