[fitsbits] Primary & Alternate WCS Keyword Order
William Pence
William.Pence at nasa.gov
Fri Jun 22 13:42:28 EDT 2012
I think Randy's question boils down to 2 possible interpretations of the
requirement in Section 8.2 of the FITS Standard that the WCSAXIS
keyword, "if present, *must* precede all WCS keywords except NAXIS in
the HDU". Does this mean that *all* the WCSAXES/WCSAXESn keyword must
precede *all* the other WCS keywords, or does it only mean that each
WCSAXESa keyword must precede all the other WCS keywords for that same
alternate system (as given by the 'a' suffix).
To make this more concrete, I think the following 2 cases DO conform to
the standard:
Case 1a:
WCSAXES = 2 / number of WCS axes
WCSAXESP= 2 / number of WCS physical axes
CTYPE1 = 'RA---TAN' / right ascension coordinate type
CRPIX1 = 3.629693431287876 / [pixel] reference pixel along image axis 1
CRVAL1 = 284.3632905 / [deg] right ascension at reference pixel
CTYPE1P = 'RAWX ' / physical WCS axis 1 type CCD col
CRPIX1P = 1 / reference CCD column
CRVAL1P = 482 / value at reference CCD column
...
Case 1b:
WCSAXESP= 2 / number of WCS physical axes
WCSAXES = 2 / number of WCS axes
CTYPE1P = 'RAWX ' / physical WCS axis 1 type CCD col
CRPIX1P = 1 / reference CCD column
CRVAL1P = 482 / value at reference CCD column
CTYPE1 = 'RA---TAN' / right ascension coordinate type
CRPIX1 = 3.629693431287876 / [pixel] reference pixel along image axis 1
CRVAL1 = 284.3632905 / [deg] right ascension at reference pixel
and I think the following case DOES NOT conform to the standard:
Case 2:
CTYPE1 = 'RA---TAN' / right ascension coordinate type
CRPIX1 = 3.629693431287876 / [pixel] reference pixel along image axis 1
CRVAL1 = 284.3632905 / [deg] right ascension at reference pixel
CTYPE1P = 'RAWX ' / physical WCS axis 1 type CCD col
CRPIX1P = 1 / reference CCD column
CRVAL1P = 482 / value at reference CCD column
WCSAXES = 2 / number of WCS axes
WCSAXESP= 2 / number of WCS physical axes
...
The question is, do either of the following cases conform to the standard?:
Case 3a:
WCSAXESP= 2 / number of WCS physical axes
CTYPE1P = 'RAWX ' / physical WCS axis 1 type CCD col
CRPIX1P = 1 / reference CCD column
CRVAL1P = 482 / value at reference CCD column
WCSAXES = 2 / number of WCS axes
CTYPE1 = 'RA---TAN' / right ascension coordinate type
CRPIX1 = 3.629693431287876 / [pixel] reference pixel along image axis 1
CRVAL1 = 284.3632905 / [deg] right ascension at reference pixel
Case 3b: (This is the case Randy cited)
WCSAXES = 2 / number of WCS axes
CTYPE1 = 'RA---TAN' / right ascension coordinate type
CRPIX1 = 3.629693431287876 / [pixel] reference pixel along image axis 1
CRVAL1 = 284.3632905 / [deg] right ascension at reference pixel
WCSAXESP= 2 / number of WCS physical axes
CTYPE1P = 'RAWX ' / physical WCS axis 1 type CCD col
CRPIX1P = 1 / reference CCD column
CRVAL1P = 482 / value at reference CCD column
...
Currently, the HEASARC's FITS verifier flags both of these cases as
violating the Standard.
-Bill
On 06/22/2012 11:57 AM, Phil Hodge wrote:
> On 06/22/2012 11:37 AM, Randy Thompson wrote:
>> A question came up regarding the relative order of
>> primary and alternate WCS keywords in a FITS header, particularly
>> the WCSAXES and WCSAXESa keywords. The current standard (section 8.2)
>> states that the WCSAXES keyword "... if present, must precede all WCS
>> keywords except NAXIS in the HDU." Does this mean the primary
>> WCS keywords must come before the alternate WCS?
> No.
>
>> Does it also imply
>> that the alternate WCSAXESa keyword must come before the other primary
>> WCS keywords or only before the alternate WCS..a keywords?
> No. If the rule about WCSAXES preceding all other WCS keywords applied
> to WCSAXESa, then WCSAXESa would have to come before WCSAXES, and
> WCSAXES must come before WCSAXESa for the same reason.
>
> Phil
More information about the fitsbits
mailing list