Closed arjunsavel closed 1 month ago
No description provided.
May want to actually describe what you are trying to do in the PR, beyond just the title
From what I can tell, what you're trying to do is to enforce that if an error has 2 significant figures, then the value should as well. In practice, this is pretty good. However, databases and python variables are not always exact. There can be float rounding/truncation errors as values are moved from python to json to database and viceversa, which can cause ordinary values to suddenly have errors.
That said, I think most of our cases should be fine as I think float precision issues start to come up with very large/very small numbers. Things like parallax could be fine.
Would this be something better placed in the schema itself rather than in the database tests? The former means any new value must have matching significant figures, the later means that this is only examined after its ingested.
These are great points! I'll try putting this in the schema.
check: is this adding digits? what about sdr all the numbers?
how to determine significant figures when 1.01 is stored as 1.00999..
have this as a validator WARNING for parallax error.
Ideally, we don't want the number of significant figures in a quantity to exceed the precision established by our error bars. This PR enforces as much for the
Parallax
table.