keyword units

William Pence pence at tetra.gsfc.nasa.gov
Tue Jul 15 12:25:10 EDT 1997


Regarding the recently proposed convention for keyword units,
Peter Teuben wrote:

>  1) Would it not be useful to add a keyword to "version" this 
> 	convention. In case it ever gets upgraded/modified? 
> 	Should it also not be a comment? But it could also 
> 	be a real keyword, in which case CFITSIO and others
> 	can more easily make (ab)use of it.
> 

One problem with a "version" keyword is that there is no rule
requiring all the keywords in a header to use the same convention.  In
cases were keywords are copied from one file to another, one could end
up with headers whose keywords use a mixture of conventions for
encoding the units string thus making a version keyword meaningless.

Both Peter Teuben and Peter Bunclark also commented on the units
strings themselves, and questioned whether SI units should be strictly
enforced, and whether there should be formal rules for constructing
compound units (such as [m/s] vs. [m s**(-1)] ).  Strictly speaking,
these questions are beyond the scope of the currently proposed
convention, in which we are simply proposing that the units string, in
whatever units or format, is enclosed in square brackets as the first
token of the comment field.

But in answer to these types of questions, several years ago the
HEASARC (also know as OGIP) FITS Working Group adopted some conventions
for specifying physical units that are documented in a memo that is
available on the Web at

legacy.gsfc.nasa.gov/docs/heasarc/ofwg/docs/summary/ogip_93_001_summary.html

This memo attempts to offer a compromise in line with the IAU
recommendations, but also allows units that are especially convenient
in astronomical applications such as deg, angstron, yr, arcsec, and
arcmin.  Prefixes (generally in powers of 3) are allowed as in: mm
(millimeter), km (kilometer), Mm (Megameter), and even Ym (yottameter =
10**24 meters).  Finally, rules for constructing compound units are
discussed, including complicated expressions involving mathematical
operations like log, ln, or sin.  Fortunately, these complicated cases
are rarely used, if at all.

The topic of units strings is probably too controversial for this memo
to be adopted as a standard, but still it should serve as a useful
starting point for other groups who are trying to establish standard
conventions for unit strings.

-Bill Pence




More information about the fitsbits mailing list