~nxg/unity#3: 
Include empty-string as a valid units string

The VOUnits document says 'An empty unit string positively indicates that the corresponding quantity is dimensionless. Since an empty string does not conform to the grammars below, this also must be checked for before unit-parsing starts.'

It might be better to add a special case of 'empty string' to the VOUnits grammar. However this would require coordination with that specification document (cf spec and github)

Status
RESOLVED FIXED
Submitter
~nxg
Assigned to
No-one
Submitted
2 years ago
Updated
1 year, 10 months ago
Labels
No labels applied.

~nxg 2 years ago

Options would be:

  1. The grammar does not cover unitless quantities: such cases mush be marked with a separate contextual notation (this is the current situation).
  2. The grammar includes an empty string as a special case, to denote unitless quantities: straightforward, but it means that this is confusable with the case where the units have been omitted, and thus implicitly forces ‘units unknown’ to have a separate contextual notation.
  3. The grammar includes a non-empty string to denote ‘unitless’, such as ‘-’ or ‘.’: this immediately distinguishes the unitless case from ‘units unknown’, at the cost of another thing to document.

~nxg 2 years ago

ISO-80000-1_2009 para 3.8, note 3, says ‘Some quantities of dimension one are defined as the ratios of two quantities of the same kind. The coherent derived unit is the number one, symbol 1.’

The QUDT http://qudt.org/vocab/dimension# namespace seems to (implicitly) use U to indicate a dimensionless quantity, but I think that's a rather local use (it's part of a rather odd-to-me scheme to indicate decimal prefixes).

~nxg referenced this from #7 2 years ago

~nxg 1 year, 11 months ago

~nxg 1 year, 10 months ago

In revision d01c83ddcd62 (with some extra test cases in 3e5917e04819) the VOUnits syntax supports "1" as a positive indicator of ‘unitless’. I'll leave this issue open until the corresponding textual change is made in the VOUnits document, and that document's issue 9 is closed.

~nxg REPORTED FIXED 1 year, 10 months ago

Done, and the GitHub issue closed

Register here or Log in to comment, or comment via email.