[fitsbits] Start of the 'INHERIT' Public Comment Period
Rob Seaman
seaman at noao.edu
Fri Apr 6 15:28:10 EDT 2007
Steve wrote:
> The data reduction package developed at Lick would not accept
> FITS files unless the PHDU contained these keywords:
>
> NAXIS = 2
> NAXIS1 = 0
> NAXIS2 = 0
>
> So that's what we put in the empty PHDU of our mosaic files. But as
> we got close to the point of deploying the instrument producing these
> files we found that we could not continue that practice, for the data
> reduction package developed at NOAO would not accept such FITS files.
> What it wanted was
>
> NAXIS = 0
>
> I note with gratitude that Pence's FITSIO toolkit allowed either
> scenario without forcing the issue.
This is also a case in which there is a clear answer in the standard
- either form is legal, but the latter is preferred:
>> NAXIS Keyword - The value field shall contain a non-negative
>> integer no greater than 999, representing the number of axes in
>> the associated data array. A value of zero signifies that no data
>> follow the header in the HDU.
>> NAXISn Keywords - The value field of this indexed keyword shall
>> contain a non-negative integer, representing the number of
>> elements along axis n of a data array. The NAXISn must be present
>> for all values n = 1,...,NAXIS, and for no other values of n. A
>> value of zero for any of the NAXISn signifies that no data follow
>> the header in the HDU. If NAXIS is equal to 0, there should not
>> be any NAXISn keywords.
The IRAF support is incomplete, but the Lick behavior is simply
bizarre. It is gratifying that CFITSIO accepted either form, but
data providers are certainly well advised to test compliance with a
range of community software resources.
Note that precisely the same issue applies here as with INHERIT. A
Lick file might be copied with third party software that quite
reasonably would note that since there are no data records that NAXIS
should equal zero. The Lick software would then refuse to recognize
the copy. The original file is conforming FITS, however.
Rob
More information about the fitsbits
mailing list