UCD validator

Mark Taylor m.b.taylor at bristol.ac.uk
Tue Mar 1 18:25:02 CET 2022


Hi Bo.

On Tue, 1 Mar 2022, Bo Milvang-Jensen wrote:

> That single UCD error is clear (my mistake). So I have written 753 valid UCDs
> :-)

Not bad!

> Interesting with the comments on the units (units which I understand have been
> produced/formatted by astropy). I guess pix2 has to be pixel2 or pixel**2. In
> my team we have been debating whether dex is valid (or should be log), but
> votlint does not complain. But is solMass wrong?

The unit validation (which you can suppress if you like using unit=false)
is validating against the VOUnits standard:

   https://www.ivoa.net/documents/VOUnits/

It's good practice to use the VOUnits syntax in VOTables, but it's
not required by the VOTable standard, so you can make your own
decision about whether to conform to it (that's why votlint issues
WARNINGs not ERRORs here).  "pix**2" or "pixel**2" are both legal
VOUnits.  "dex" is not a recognised VOUnit, but it doesn't violate
the syntax.  If you can't be bothered to read the standard, stilts
can help you to test these things:

   % stilts calc 'vounitStatus("pix2")'
   BAD_SYNTAX
   % stilts calc 'vounitStatus("pix**2")'
   OK
   % stilts calc 'vounitStatus("dex")'
   UNKNOWN_UNIT

> Mark, I have not yet tried what you suggested. Would it be a more
> comprehensive test suite than votlint?

No, the actual validation is the same, it's just a case of which is
more convenient depending on where your UCDs are (in a text file or
actually present decorating some table columns).

Mark

--
Mark Taylor  Astronomical Programmer  Physics, Bristol University, UK
m.b.taylor at bristol.ac.uk          http://www.star.bristol.ac.uk/~mbt/


More information about the semantics mailing list