Re: [fitsbits] Abuse of EXTEND keyword



This mention of the NEXTEND keyword caused me to rethink what is really meant by EXTEND = F: EXTEND = T is defined to mean that the FITS file *is permitted* to have extensions following the primary array (the actually wording in the Standard is "may contain extensions" ); it does not mean that the file actually has any extensions.

If EXTEND = F, then this logically means the opposite, i.e., that the FITS file is *not permitted* to have any extensions. But this is not the meaning that the STEREO mission folks really intended by setting EXTEND = F since they surely don't care if users were to add extensions to the files at a later date. In fact, I can't think of any case where it would really be appropriate to set EXTEND = F. Instead, I think the desired meaning can be expressed by this pair of keywords:

EXTEND = T
NEXTEND = 0

which means that the file currently has no extensions following the primary array, but it is permitted to add extensions if desired. I'm not really recommending this, however, because as previously mentioned by Preben Grosbol, it could become a burden to keep the NEXTEND keyword up to date as extensions get added or removed from the file. Instead, if software needs to know if there are extensions in the file then it can just do an inventory of the file in real time. This is not a time consuming operation since it does not require reading the whole file; the software can directly jump to the header of each subsequent extension, at least on random access storage devices.

Bill Pence

Randall Thompson wrote:
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.
--
____________________________________________________________________
Dr. William Pence pence@xxxxxxxxxxxxxxxxxxxxxx
NASA/GSFC Code 662 HEASARC +1-301-286-4599 (voice)
Greenbelt MD 20771 +1-301-286-1684 (fax)


.



Relevant Pages

  • Re: [fitsbits] Abuse of EXTEND keyword
    ... The inescapable conclusion appears to be that EXTEND and NEXTEND are ... actually wording in the Standard is "may contain extensions"); ... desired meaning can be expressed by this pair of keywords: ...
    (sci.astro.fits)
  • Re: are imaginary exponents "truly" defined that way?
    ... definition in order to extend it to cases where b is negative, ... Other extensions would preserve different rules. ... sqrtis a FUNCTION, defined on the non-negative reals, such that ... Your grasp of the "laws of exponents" is inadequate. ...
    (sci.math)
  • Re: Server Ext 2002 admin program too old
    ... There is no option to choose to extend only with the FP server extensions or ... with sharepoint extensions. ... The administration webpage will allow me to ... extend the default website with version ...
    (microsoft.public.frontpage.extensions.windowsnt)
  • Re: Ive installed the extensions .... now what?
    ... I can't tell for sure, but, it appears that, when you did the "extend thing" ... you were in the WSS Central Administration site, ... SharePoint Services extensions to your site. ... Then right clicked it, chosen All Tasks, and then "Configure Server ...
    (microsoft.public.frontpage.extensions.windowsnt)

Loading