VOUnit encodings

Norman Gray norman at astro.gla.ac.uk
Fri Jul 27 12:24:38 CEST 2018


[Resending to semantics at ivoa, since I sent an earlier reply from the 
wrong address, and it bounced]

Stuart, hello.

On 25 Jul 2018, at 19:00, Chalk, Stuart wrote:

> I am using the VOUnit encoding specification and wondering if there 
> are list of units encoded in the VOUnit spec anywhere.
> If anyone has any info on available lists of units please send me an 
> email directly.

I can add a little to what Markus has said.

In general, you probably want to start with the Unity distribution 
rather than the repository (see [1] and [2]), since there's quite a lot 
of preprocessing happens between the repo and the distribution bundle.  
In particular, see src/grammar/known-units.csv in the distribution (this 
happens to be one of the files that is included unchanged from the 
repo).

That CSV file should be equivalent to, in the sense of being used to 
generate, Table 2 in the VOUnits spec [3].

As Markus notes, the spec obliges parsers to accept 'unknown' units, but 
the API in the Unity distribution is able to indicate that these are 
'unknown'.  There's some rationale in Sect. 2.4 of the document.

The master grammar is in src/grammar/unity.y in the repo, but that's 
distributed as post-yacc files in src/c/unity-*.tab.c, with reference 
versions in src/grammar/unity-*.txt

I'd be delighted to help with any other questions.

Best wishes,

Norman


[1] http://www.astro.gla.ac.uk/users/norman/ivoa/unity/
[2] https://bitbucket.org/nxg/unity/downloads/
[3] http://www.ivoa.net/documents/VOUnits/

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


More information about the semantics mailing list