[fitsbits] Abuse of EXTEND keyword

Randall Thompson rthomp at stsci.edu
Thu Aug 23 17:15:41 EDT 2007


I agree with Tim, defining EXTEND=F to mean the same thing as
EXTEND=T makes it worthless, and at that point maybe it should
just be deprecated. You are basically saying that EXTEND=F,
EXTEND=T, or leaving it out completely all mean the same thing;
namely, extensions may or may not exist.

By the way, we get many files delivered for archiving within MAST
that use both the EXTEND and the NEXTEND keyword. Although not a
reserved keyword, NEXTEND is commonly used to describe the
number of included extensions. I guess we are in the minority on this,
but when these keywords disagree with the file contents we either
correct them or ask the contributors to do it. I don't know if either
is really useful for a FITS reader, but they can be useful for getting
an idea of the file structure when just reading the primary header.

Randy

William Pence wrote:

>Tim Pearson wrote:
>  
>
>>Perhaps I am misunderstanding or misremembering something here, but I  
>>think EXTEND=T does actually have a purpose, and to suggest that both  
>>EXTEND=T and EXTEND=F are merely advisory is crazy. We should not add  
>>the words "nor does the absence of this keyword necessarily imply  
>>that the file does not contain extensions" to the FITS standard.
>>    
>>
>
>Can you explain why this should not be done?  Also, the EXTEND = T 
>keyword has always been advisory, so it seems consistent to declare that 
>EXTEND = F should also be advisory.
>
>Whether or not a FITS file has conforming extensions following the 
>primary array is a simple observable fact; the presence or value of the 
>EXTEND keyword will not change that fact, so the EXTEND keyword seems to 
>serve little useful purpose, and even worse, it can create confusion if 
>EXTEND is not present, or has the value = F in a file that actually has 
>extensions.  So the purpose of the proposed change to the EXTEND keyword 
>is to make it clear to software developers that they should not depend 
>on the existence, or value, of the EXTEND keyword when deciding whether 
>or not to read or write an extension in a FITS file.
>
>  
>




More information about the fitsbits mailing list