[fitsbits] Primary & Alternate WCS Keyword Order

Dick Shaw shaw at noao.edu
Mon Jun 25 12:41:41 EDT 2012


Randy's question uncovers an ambiguity in the FITS v3.0 standard that really 
ought to be fixed. I think the need for WCSAXESa remains well justified, but 
how much does the keyword order matter? Sect. 8.2 technically requires that 
this keyword precede _all_ WCS keywords except NAXIS, but for headers with 
more than one WCS description this requirement as worded cannot be met. 
(WCSAXESA must precede all WCS keywords... but what about WCSAXES and 
WCSAXESB, etc.?)

I propose that the description of WCSAXES in Sect. 8.2 be amended as follows:

WCSAXES -- [integer; default: NAXIS or largest of WCS indexes i or j]
Number of axes in the named* WCS description. This keyword, if present, _must_ 
precede all WCS keywords for its named WCS description except NAXIS in the 
HDU. The value of WCSAXES _may_ exceed the number of pixel axes for the HDU. 
The default value mentioned above applies to any named WCS "a" if WCSAXESa is 
absent, but does not apply to a named WCS otherwise.

[Footnote *]: The "a" refers to the name of the WCS represented by all WCS 
keywords with the "a" suffix. Its primary function is to provide a means by 
which to specify a particular WCS if multiple versions are defined in the HDU. 
See Sect. 8.2.1.

The intent of the above wording (in case I flubbed it up)  is to allow all of 
the cases mentioned in Bill Pence's earlier e-mail to be valid. As far as I 
can tell, this change would not invalidate any existing FITS file that was 
valid before. A reasonable alternative, in my view, would be to change the 
word "_must_" to "_should_" if no compelling reason can be found for 
specifying the order of these keywords.

-Dick




More information about the fitsbits mailing list