From sebastien.derriere at astro.unistra.fr Fri Dec 16 15:31:51 2011
From: sebastien.derriere at astro.unistra.fr (Sebastien Derriere)
Date: Sat, 17 Dec 2011 00:31:51 +0100
Subject: VOUnits 1.0
Message-ID: <4EEBD4E7.3020505@astro.unistra.fr>
Hello,
It is a time of year when many are busy trying to find nice presents,
so I am happy to share with you the version 1.0 of the VOUnits document,
released as a working draft for discussion within the semantics WG,
and destined to follow the IVOA recommendation process.
http://www.ivoa.net/internal/IVOA/UnitsDesc/WD-VOUnits-1.0-20111216.pdf
It is a major update of the previous 0.3 working draft, revamped to
take into account the TCG, DM and Semantics discussions held during
the last interop meetings.
I have however kept the original list of authors, so simply tell me
if you wish to be removed. And I wish I haven't forgotten anyone.
A few points await your remarks and comments. I have set up a wiki page
for this :
http://www.ivoa.net/cgi-bin/twiki/bin/view/IVOA/DiscussionOnVOUnits
You can either post your comments on this page directly or reply to
the semantics mailing list. The wiki page is not the RFC, but will be
used as a justification of decisions made in the document, and linked
from the RFC page when we get there.
I am awaiting your comments !
Sebastien.
--
((( Sebastien Derriere sebastien.derriere at astro.unistra.fr
(. .) Observatoire de Strasbourg Phone +33 (0) 368 852 444
(( v )) 11, rue de l'universite Telefax +33 (0) 368 852 417
---m-m--- F-67000 Strasbourg France
From norman at astro.gla.ac.uk Mon Dec 19 09:08:35 2011
From: norman at astro.gla.ac.uk (Norman Gray)
Date: Mon, 19 Dec 2011 17:08:35 +0000
Subject: VOUnits 1.0
In-Reply-To: <4EEBD4E7.3020505@astro.unistra.fr>
References: <4EEBD4E7.3020505@astro.unistra.fr>
Message-ID: <8B223228-B07C-4C22-9568-8950E6D3A153@astro.gla.ac.uk>
S?bastien and all, hello.
On 2011 Dec 16, at 23:31, Sebastien Derriere wrote:
> It is a time of year when many are busy trying to find nice presents,
> so I am happy to share with you the version 1.0 of the VOUnits document,
> released as a working draft for discussion within the semantics WG,
> and destined to follow the IVOA recommendation process.
> http://www.ivoa.net/internal/IVOA/UnitsDesc/WD-VOUnits-1.0-20111216.pdf
Excellent -- a fine read.
> A few points await your remarks and comments. I have set up a wiki page
> for this :
> http://www.ivoa.net/cgi-bin/twiki/bin/view/IVOA/DiscussionOnVOUnits
> You can either post your comments on this page directly or reply to
> the semantics mailing list. The wiki page is not the RFC, but will be
> used as a justification of decisions made in the document, and linked
> from the RFC page when we get there.
The document mentions the unity library I wrote. I can add a couple of extra comments about that.
The library was written with the following goals:
* Producing formal grammars of the existing and proposed standard unit syntaxes, for reference purposes
* Participating in this standardisation process by acting as a locus for experimentation with syntaxes and proposed standards
* Discovering edge cases, producing machine-readable versions of the prescriptions in the standard, and producing test cases.
* Producing parsing libraries which were fast and standalone, and so could be conveniently used by other software; this will act as an implementation of the eventual VOUnits standard
The grammars of the FITS, OGIP and CDS syntaxes are all in the form of yacc-style grammars. These are associated with C, but the same syntax is used for other languages. The unity library distributes a C and a Java library based on the same grammars; others should be reasonably easy to add.
I'll shortly add some comments to the wiki page.
The source is at , and the snapshot downloads are there, too.
All the best,
Norman
--
Norman Gray : http://nxg.me.uk
SUPA School of Physics and Astronomy, University of Glasgow, UK
From norman at astro.gla.ac.uk Tue Dec 20 04:47:23 2011
From: norman at astro.gla.ac.uk (Norman Gray)
Date: Tue, 20 Dec 2011 12:47:23 +0000
Subject: VOUnits 1.0
In-Reply-To: <8B223228-B07C-4C22-9568-8950E6D3A153@astro.gla.ac.uk>
References: <4EEBD4E7.3020505@astro.unistra.fr>
<8B223228-B07C-4C22-9568-8950E6D3A153@astro.gla.ac.uk>
Message-ID:
On 2011 Dec 19, at 17:08, Norman Gray wrote:
> I'll shortly add some comments to the wiki page.
On second thoughts, here might be more appropriate.
In the New Year, I'll extend the Unity library to include a formal grammar for the VOUnits prescriptions, which appear to be pretty similar to the FITS one.
When developing the grammars, and in particular when categorising the various units, I ended up with an explicit distinction between 'unrecognised', 'deprecated' and 'recommended' units; deprecated units are recognised. That meant that the 'conformance levels' for a parsed unit expression were 'all units recommended', 'all units recognised', and 'all usage constraints satisfied'. The first two mean that there are no unrecommended or unrecognised units in the expression, the last that all recognised units are at used in a recommended manner, meaning no SI prefixes where they're not allowed. These are fairly orthogonal. That means that 'mfortnight' will parse as a milli-fortnight, be unrecognised, but also satisfy all constraints, since there are none.
I can't think of any other ways of imposing constraints on expressions which are basically valid, other than this way of retrospectively allowing the user to test for conformance levels.
The way the parsing worked, 'pixel' and 'pix' are both parsed as pixels (obviously), but 'pixe', for example, is parsed as a pico-ixe, with the 'ixe' being classed as an unrecognised unit.
The FITS specification, and the draft VOUnit specification both say "The IAU style manual forbids the use of more than one slash (/) character in a units string. However, since normal mathematical precedence rules apply in this context, more than one slash may be used but is discouraged." There's no way of expressing 'discouraged' in a grammar -- something either is a valid string or it isn't -- so the FITS grammar in this library simply forbids more than one slash, and I suggest that the VOUnit grammar forbid this, too.
There are a few ambiguities in the CDS and OGIP specifications, which I won't expand here, because the VOUnit spec seems to follow the FITS spec most closely.
I wasn't able to deduce from the FITS spec whether m^1.5 was legal or not, because the power is not surrounded by brackets. I think it's meant to be illegal, and the grammar reflects this. Perhaps the VOUnit spec could be more precise here.
Similarly, I couldn't work out whether the FITS spec permitted "m**3/kg s^2". The text suggests that parentheses would be a good idea, but doesn't forbid anything. The Unity FITS grammar permits this, and parses it as everything to the right of the solidus being the divisor.
I think it would be useful for the VOUnit specification to include the formal grammar we decide on.
My list of 'known units' in the three syntaxes is at . It's in a very compact form, so I mention it here for completeness rather than because it's readable.
All the best,
Norman
--
Norman Gray : http://nxg.me.uk
SUPA School of Physics and Astronomy, University of Glasgow, UK