Dimensionless units in VOUnits 1.1

Ole Streicher ole at aip.de
Wed Oct 23 11:11:26 CEST 2024


Hello semantickers,

I just stumbled upon a probably forgotten change in VOUnits 1.1 [1]:
While section 2.2 now states

> In each of the grammars here, the empty string is not a valid units 
> string - in particular, it is not taken to indicate a dimensionless 
> quantity. […] The VOUnits syntax, though it also deems the empty 
> string to be invalid, recognises the string 1 as positively 
> indicating a dimensionless quantity.

section 2.8 still claims

> If there is no unit associated with a quantity (for example a
> quantity that is a character string, or unitless), data providers
> should indicate this with an empty string rather than blanks or
> dashes.

which makes it not fully clear whether one should use an empty string or 
the string "1" for the dimensionless unit.

But there is another problem with using "1" for dimensionless unit: it 
breaks FITS compatibility (and Astropy parsing). Section 2.12 (although 
informative) claims that VOUnits are FITS compliant unless scale factors 
or quoted-units are used. Section 2.2 (cited above) however doesn't 
introduce the "1" mark as a scale-factor.

Given that dimensionless quantities are quite common, this may produce 
rather a mess when converting from/to FITS, and especially when it comes 
to function units: VOUnit would (probably) need "log(1)", while FITS 
fill surely not accept that (not sure what one would use there: "log()"?)

Or did I misunderstand this?

Best

Ole

[1] https://github.com/ivoa-std/VOUnits/issues/37


More information about the semantics mailing list