[fitsbits] Proposed Changes to the FITS Standard

William Pence pence at milkyway.gsfc.nasa.gov
Tue Aug 21 17:56:49 EDT 2007


The difference here is that I was quoting the revised definition in the 
new draft standard, which doesn't allow for the possibility that EXTEND 
= F.  Given that there are existing FITS files with EXTEND = F, the 
definition should probably be revised to at least not prohibit this usage.

One problem with relying on the veracity of EXTEND = F is that even if 
the FITS file doesn't currently have extensions, they might be added at 
a later time, and there is a good chance the EXTEND keyword value would 
not get updated to T in the process.  So just as software should not 
assume that a file has extensions if EXTEND = T, it could be unwise to 
assume there are no extensions just because EXTEND = F.

The purpose of this proposed change to the standard is to allow a FITS 
file to containing extensions even if the primary array neglects to 
contain the EXTEND = T keyword.   Similarly, a FITS file should be 
allowed to have extensions if EXTEND = F, even though this is 
contradictory, simply because the actual existence of the extension 
should take precedence, regardless of what the EXTEND keyword implies. 
Software can easily determine for itself whether there are extensions by 
examining the file, so there is no need to depend on the EXTEND keyword, 
whose presence or value may be unreliable.

Bill Pence

William Thompson wrote:
> It's not clear to me that the FITS standard forbids setting EXTEND=F.
> 
>> EXTEND Keyword The use of extensions necessitates a single additional keyword in the
>> primary header of the FITS file. If the FITS file may contain extensions, a card image
>> with the keyword EXTEND and the value field containing the logical value T must appear
>> in the primary header immediately after the last NAXISn card image, or, if NAXIS=0,
>> the NAXIS card image. The presence of this keyword with the value T in the primary
>> header does not require that extensions be present.
> 
> To me, having EXTEND=F when one knows that no extensions are present is one of 
> those "bedrock of logic" that Rob Seaman refers to.
> 
> Bill Thompson
> 
> 
> William Pence wrote:
>> William Thompson wrote:
>>
>>> The SECCHI instrument on the STEREO mission produces some files with table 
>>> extensions, and other files which don't.  The value of the EXTEND keyword is set 
>>> to either T or F to account for this.
>>
>> Strictly speaking, this does not conform to the definition of the EXTEND 
>> keyword in the FITS Standard, which states that the value field *shall* 
>> contain a logical constant with the value T, and thus must never be set 
>> to F.    All the more reason I think to demote this keyword by making it 
>> optional instead of required if the file contains extensions.
>>
>> Bill Pence
> 


-- 
____________________________________________________________________
Dr. William Pence                       pence at milkyway.gsfc.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