[VOUnit] How to express the unit of a dimensionless quantity?

Mark Taylor m.b.taylor at bristol.ac.uk
Thu Mar 7 12:23:09 CET 2024


On Thu, 7 Mar 2024, Norman Gray via semantics wrote:

> Sect.2.2 notes that the empty string is not a valid 'units string', but if you want to put that into the 'units' column of your database, this standard isn't going to forbid you -- it's your database, after all -- but a units parser is obliged to report that as an invalid string.
> 
> Sect.2.8 is therefore proposing a good practice, namely to put an empty string in this column of the database, rather than some other flag, which might cause confusion or uncertainty in future.  That is, it's suggesting which particular invalid units string might be the best choice in this location.  An empty string shouldn't cause confusion, since the database owners presumably know that the column is a non-unit object, and the fact that there's a 'units' field associated with it, which requires a value, is merely an artefact of schema design.

FWIW neither votlint nor taplint will report an error for the case of
an empty string where a (otherwise unconstrained) VOUnit string is
expected, on the grounds that an empty string looks like a decision
not to supply a unit rather than a malformed attempt to supply a unit.

--
Mark Taylor  Astronomical Programmer  Physics, Bristol University, UK
m.b.taylor at bristol.ac.uk          https://www.star.bristol.ac.uk/mbt/


More information about the semantics mailing list