Subject: Re: Formal fits grammar (was: Re: Are HEX integers allowed in header?)

From: Clive Page <cgp at le.ac.uk>
Date: 4 Dec 1995 13:20:15 -0000

In article <slrn4brofq.qu.davis at wiwaxia.mit.edu>,
John E. Davis <davis at space.mit.edu> wrote:
>  etc....
>  
>I really believe that the fits definition should go into such detail.  For
>me, there appear to be too many ambiguities in the fits definition.  Such a
>grammar would resolve these issues.

I agree with you. On this particular point of hex constants: it must
surely be an unintentional lack of rigour that allows this, as surely
only decimal numbers were only intended here.

The problem has been that the desire to say "once a FITS file, always a
FITS file" (which I've heard Don Wells declaim more than once).  This
means that no rule should be introduced which invalidates past data
files. Because FITS has long been used for archiving data this is in
general a sensible rule, but perhaps it can be taken too far.

I came upon a similar problem not long ago when making a parser for a
table browser.  I hoped it would always be possible to distinguish
column-names from constants so the user could select rows using an
ordinary arithmetic expression with column-names, constants, and
operators (similar to FSELECT in FTOOLS). But the FITS standard allows
column-names to consist of all digits (and start with a minus sign come
to that). Now hardly anyone uses names like that, as it just seems
natural to a programmer to start a name with a letter.  But you can if
you want give your column a name like "42" (and it will break my
browser).  It would be nice if the FITS Standard disallowed such things,
but it may be too late now.

-- 
-------------------------------------------------------------------------
Clive Page,                         Internet: cgp at star.le.ac.uk
Dept of Physics & Astronomy,        
University of Leicester.