<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>
<div>Hi all,</div>
<div>A question came up regarding the relative order of</div>
<div>primary and alternate WCS keywords in a FITS header, particularly</div>
<div>the WCSAXES and WCSAXESa keywords. The current standard (section 8.2)</div>
<div>states that the WCSAXES keyword "... if present, must precede all WCS</div>
<div>keywords except NAXIS in the HDU." Does this mean the primary</div>
<div>WCS keywords must come before the alternate WCS? Does it also imply</div>
<div>that the alternate WCSAXESa keyword must come before the other primary</div>
<div>WCS keywords or only before the alternate WCS..a keywords?</div>
<div><br>
</div>
<div>The files in question have keywords in the following order:</div>
<div><br>
</div>
<div>WCSAXES = 2 / number of WCS axes</div>
<div>CTYPE1 = 'RA---TAN' / right ascension coordinate type</div>
<div>CTYPE2 = 'DEC--TAN' / declination coordinate type</div>
<div>CRPIX1 = 3.629693431287876 / [pixel] reference pixel along image axis 1</div>
<div>CRPIX2 = 2.7371500092122574 / [pixel] reference pixel along image axis 2</div>
<div>CRVAL1 = 284.3632905 / [deg] right ascension at reference pixel</div>
<div>CRVAL2 = 43.96403 / [deg] declination at reference pixel</div>
<div>CUNIT1 = 'deg ' / physical unit in column dimension</div>
<div>.</div>
<div>.</div>
<div>.</div>
<div>WCSAXESP= 2 / number of WCS physical axes</div>
<div>CTYPE1P = 'RAWX ' / physical WCS axis 1 type CCD col</div>
<div>CUNIT1P = 'PIXEL ' / physical WCS axis 1 unit</div>
<div>CRPIX1P = 1 / reference CCD column</div>
<div>CRVAL1P = 482 / value at reference CCD column</div>
<div>CDELT1P = 1.0 / physical WCS axis 1 step</div>
<div>CTYPE2P = 'RAWY ' / physical WCS axis 2 type CCD row</div>
<div>CUNIT2P = 'PIXEL ' / physical WCS axis 2 units</div>
<div><br>
</div>
<div>I thought this would be valid, but the current FITS validator from </div>
<div>HEASARC flags this as an error because the WCSAXESP keyword</div>
<div>comes after the CTYPE1 keyword.</div>
<div><br>
</div>
<div>I have discussed this with Bill Pence and the feeling was that</div>
<div>it might be a good issue for discussion on fitsbits. Whatever</div>
<div>the concensus is, I think it might help if the standard could be </div>
<div>clarified.</div>
<div><br>
</div>
<div>Randy Thompson</div>
</div>
</body>
</html>