[fitsbits] Primary & Alternate WCS Keyword Order
William Pence
William.Pence at nasa.gov
Thu Jun 28 16:21:25 EDT 2012
Based on the lengthy discussion of this issue here, I have modified the
on-line FITS file verifier at http://fits.gsfc.nasa.gov/fits_verify.html
to temporarily disabled any checks on the position of the WCSAXESa
keywords (where a = A-Z) in FITS headers. It seems that requiring that
all the WCSAXESa keywords appear before ANY other WCS keyword goes
beyond what was intended. For now at least, the FITS verifier still
requires that the WCSAXES keyword itself (without an alternate suffix
letter) appear before any other WCS keyword, but the alternate WCSAXESa
keywords may appear anywhere.
-Bill
On 06/22/2012 11:37 AM, Randy Thompson wrote:
> 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
--
____________________________________________________________________
Dr. William Pence William.Pence at nasa.gov
NASA/GSFC Code 662 HEASARC +1-301-286-4599 (voice)
Greenbelt MD 20771 +1-301-286-1684 (fax)
More information about the fitsbits
mailing list