[fitsbits] Primary & Alternate WCS Keyword Order

Randy Thompson rthomp at stsci.edu
Fri Jun 22 11:37:04 EDT 2012


Hi all,
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? 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?

The files in question have keywords in the following order:

WCSAXES =                    2 / number of WCS axes
CTYPE1  = 'RA---TAN'           / right ascension coordinate type
CTYPE2  = 'DEC--TAN'           / declination coordinate type
CRPIX1  =    3.629693431287876 / [pixel] reference pixel along image axis 1
CRPIX2  =   2.7371500092122574 / [pixel] reference pixel along image axis 2
CRVAL1  =          284.3632905 / [deg] right ascension at reference pixel
CRVAL2  =             43.96403 / [deg] declination at reference pixel
CUNIT1  = 'deg     '           / physical unit in column dimension
.
.
.
WCSAXESP=                    2 / number of WCS physical axes
CTYPE1P = 'RAWX    '           / physical WCS axis 1 type CCD col
CUNIT1P = 'PIXEL   '           / physical WCS axis 1 unit
CRPIX1P =                    1 / reference CCD column
CRVAL1P =                  482 / value at reference CCD column
CDELT1P =                  1.0 / physical WCS axis 1 step
CTYPE2P = 'RAWY    '           / physical WCS axis 2 type CCD row
CUNIT2P = 'PIXEL   '           / physical WCS axis 2 units

I thought this would be valid, but the current FITS validator from
HEASARC flags this as an error because the WCSAXESP keyword
comes after the CTYPE1 keyword.

I have discussed this with Bill Pence and the feeling was that
it might be a good issue for discussion on fitsbits. Whatever
the concensus is, I think it might help if the standard could be
clarified.

Randy Thompson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listmgr.nrao.edu/pipermail/fitsbits/attachments/20120622/db1e0dc0/attachment.html>


More information about the fitsbits mailing list