[fitsbits] Primary & Alternate WCS Keyword Order

Mark Calabretta mark at calabretta.id.au
Wed Jun 27 09:40:53 EDT 2012


On Tue 2012/06/26 16:00:41 -0400, William Pence wrote

>Regarding the ordering of FITS header keywords, it's interesting to note 
>that other than the 9 mandatory structural FITS keywords that must 
>appear in a specific order (SIMPLE, XTENSION, BITPIX, NAXIS, NAXISn, 
>PCOUNT, GCOUNT, TFIELDS, and END), WCSAXES is the only other keyword 
>defined in the FITS Standard that has any restrictions on the position 
>that it can have in the header.   Maybe this requirement was useful back 
>in the days of having to read FITS files sequentially off of magnetic 
>tape, but now I think it is hard to justification why this one keyword 
>should have this special positional requirement?

Indeed, it is clear why some of these need a specific order
(SIMPLE, XTENSION, END).

However, it is less clear why others do.  Specifically, why
would I need to know the data format (BITPIX, NAXISj, PCOUNT,
GCOUNT) until I have finished reading the header?

Others seem intended to facilitate one-pass sequential scanning
(NAXIS, TFIELDS, WCSAXESa) as these define the number of
parameterised keywords to expect.

Regards,
Mark Calabretta





More information about the fitsbits mailing list