[fitsbits] FITS verifier

William Pence William.Pence at nasa.gov
Thu Aug 12 15:17:33 EDT 2010


The FITS verifier at http://fits.gsfc.nasa.gov/fits_verify.html has been 
updated to conform to the changes that were introduced in Version 3.0 of 
the FITS Standard.  It also performs a few more checks of the WCS 
keywords than in the previous version.  Please let me know if you find 
any discrepancies (false positives or false negatives) when testing any 
FITS files.

Even though it appears to be legal usage, the FITS verifier will issue a 
warning if the index of any WCS keyword is greater than the value of 
NAXIS, and if there is no WCSAXES keyword.  This issue is perhaps 
something that should be reexamined during the next revision of the FITS 
Standard.

regards,
Bill Pence


Thompson, William T. (GSFC-671.0)[ADNET SYSTEMS INCORPORATE] wrote:
> I know that in my own software, those additional axes will be ignored if there 
> is no WCSAXES keyword.
> 
> Doug Tody wrote:
>> Hi Bill -
>>
>> For backwards compatibility I believe we had to define that WCSAXES
>> is not required when WCSAXES=NAXIS.  Evidently the standard allows
>> the keyword to be omitted when WCSAXES > NAXIS as well.  However I
>> suggest that it "should" be provided in this case (although FITS
>> does not make such a distinction).  It might be nice to issue an
>> informational warning in such a case, even though it is legal usage.
>> That is, flag any actual errors, but also issue informational comments
>> when there is a departure from suggested usage.
>>
>>  	- Doug
>>
>>
>> On Thu, 5 Aug 2010, William Pence wrote:
>>
>>> I'm in the process of updating the FITS verifier code to deal with
>>> changes in version 3 of the FITS Standard, and have a question about the
>>> correct usage of the WCSAXES keyword: is this keyword optional in cases
>>> where the WCS has more axes than specified by the NAXIS keyword, as in
>>> the following fragment of a FITS image header:
>>>
>>> NAXIS  = 2
>>> NAXIS1 = 512
>>> NAXIS2 = 512
>>> CRPIX1 = 256
>>> CRPIX2 = 256
>>> CRPIX3 = 1
>>> ...
>>>
>>> Should the FITS verifier issue a warning in this case (where there is no
>>> WCSAXES keyword) that the index on the CRPIX3 keyword is greater than
>>> the NAXIS keyword value?
>>>
>>> The FITS Standard states that the default value for the WCSAXES keyword,
>>> if it is not physically present, is "NAXIS, or largest of WCS indexes i
>>> or j".  This suggests that the above example header is legal, and that
>>> the default value of WCSAXES is 3 this case.  If this is the correct
>>> interpretation, then the FITS verifier should not issue a warning in
>>> this case.
>>>
>>> Bill
-- 
____________________________________________________________________
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