[fitswcs] Units along spectral axes

David Berry dsb at ast.man.ac.uk
Fri Jun 10 05:10:34 EDT 2005


On Fri, 10 Jun 2005, Pedro Osuna wrote:

> Dear William and all,
>
> the problem mentioned by William is what led my colleague Jesus Salgado
> and myself to formulate a possible solution using simple dimensional
> analysis to handle units (in the context of the IVOA).
>
> We basically propose that any unit should carry its dimensions and
> scaling factor (based on SI, for instance) so that, for example, the
> unit Jansky would appear like:
>
>
> name=Jansky
> symbol=Jy
> scale=1E-26
> dimeq=MT**-2
>
>
> parsing is not needed anymore as the unit is not defined by the name but
> by the dimensions MT**-2 1E-26.
>
>
> This solves the problem mentioned by William, which is quite common.

Yes, adding the extra FITS headers you describe would solve it, but then
so would correcting the existing deviant units string. Correcting the
existing deviant headers would be less work and would avoid the overhead
of introducing even more headers. But don't both of these solutions have
the big big problem that they require changes to be made to all the
existing deviant FITS files?


> besides solving many problems with the parsing (normally problematic due
> to the different standards of same things) it allows for clients to
> handle more complex problems.

I'm curious about this. Since a units parser will effectively do something
equivalent to a dimensional analysis, what extra problems can your
suggestion provide solutions for? Writing a unit parser, whilst not
trivial, is not a huge job. Mark Calabretta says WCSLIB now has one. AST
has one. Bill is writing one. And there are undoubtedly others that I do
not know of. Adding support for deviant units is also, as Mark has pointed
out, not difficult. The most difficult question is deciding where abouts
to put the translation.

David





More information about the fitswcs mailing list