VOUnits update: Empty/missing units

Markus Demleitner msdemlei at ari.uni-heidelberg.de
Tue Nov 30 13:31:00 CET 2021


Dear Semantics, dear Apps,

Norman and I are currently preparing a maintenance release of VOUnits,
<https://github.com/ivoa-std/VOUnits>.

As part of that, we figured we should finally tackle the question of
null-ish units.  There are at least two aspects to the problem:

(a) The unit attribute of dimensionless quantities

That's what I'd call values that conceptually would have a unit, but
that unit works out to one.  Think of ratios, or a cofficient of
performance, or many similar things.  I think everyone uses unit=""
for these right now, but that's a problem because the VOUnits grammar
(like all other unit grammars discussed in the spec) does not admit
the empty string.  Hence, if we think that is what should be done, we
should probably fix the grammar accordingly.

That's a special case, though, and when we're special-casing anyway,
there's something to be said for making "1" that special case.  There
may be profound reasons to prefer that, but a very pragmatic one
would be that unit="1" indicates that someone has thought about it
and it's not just some kind of unfilled template or other oversight,
and in particular that it's not something like what we have in (b).

So: Does anyone have preferences in one or the other direction?  Or
should we perhaps do something entirely different?


(b) Telling apart unitless values

In contrast to dimensionless quanitites, these (in my nomenclature;
I've frankly not researched yet if there's an official terminology
for this) are things that cannot acquire a unit even if you multiplied
with a unit-carrying other value.  Think of URIs, author names, or
obscore's calibration levels.

The first question is: do we need a distinction between this case and
the dimensionless case?  If so, what for?

In principle, a client knowing that calib_level is really unitless
could raise an error if someone tries to compute calib_level*(3*u.km)
or so; but it's not clear to me whether that's enough of a benefit to
even bother to introduce the terminology, let alone some feature(s).

So: Would anyone champion the need for that distinction?  And if so,
would you be happy with saying "leave out any unit attribute for
unitless, give an empty string/the 1 for dimensionless"?

         -- Markus


More information about the semantics mailing list