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

Norman Gray norman.gray at glasgow.ac.uk
Thu Mar 7 12:57:03 CET 2024


Mark, hello.

On 7 Mar 2024, at 11:23, Mark Taylor 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.

The standard thinks that's a good idea.

Another way of expressing the standard's suggestion is that "unknown" and "" are the only two non-valid strings one would hope to see in a 'units' column.  The first is unambiguous; the second is ambiguous between unknown and unitless, but the choice is presumably deliberate, and the resolution should be clear from context.

Only "1", and specifically not "", is intended to be a positive indication that the quantity is dimensionless.

Perhaps the above is reasonably brief replacement text for Sect.2.2?

Best wishes,

Norman


-- 
Norman Gray  :  https://nxg.me.uk
SUPA School of Physics and Astronomy, University of Glasgow, UK


More information about the semantics mailing list