cl> imheader n0g70106t_cal.fits[0] long+ | pagewhere [0] identifies the primary header. To list the header of the second science image in a MULTIACCUM sequence (the sixth extension):
cl> imheader n0g70106t_cal.fits[6] long+ | pageAn example of a header listing is shown in Figure 15.3 below.
Figure 15.3: Long imheader
Chapter 2 describes in detail how to work with FITS file extensions. Here we will recap the essentials. In order to simplify access to NICMOS FITS image extensions, each extension header contains the two keywords: EXTNAME (extension name) and EXTVER (extension version number). The EXTNAME keyword identifies the nature of the extension (SCI, ERR, DQ, SAMP, TIME, see Table 15.7). The EXTVER keyword contains an integer value which is used to uniquely identify a particular imset (quintuple of image extensions). For example, the five image extensions (single imset) contained in the science data file for an ACCUM, RAMP, or BRIGHT OBJECT observation will all usually be assigned an EXTVER value of 1 because there will only be one group of extensions in the file. In a MULTIACCUM science data file, each group of extensions associated with a given readout will have a unique EXTVER value, running from 1 up to the total number of readouts in that particular file.
cl> imheader n0g70106t_cal.fits[sci,2] long+ | pageIn general, to access a particular image extension, the name and version number of the desired extension in square brackets on the end of the file name. The EXTNAME value is specified first, then the EXTVER value, separated by a comma. Indeed, the use of the keywords EXTNAME and EXTVER is not limited to the task imheader, but can be used in all IRAF tasks.
The primary header data unit in a NICMOS FITS file does not contain the EXTNAME or EXTVER keywords. The absolute extension number 0 (zero) refers to the primary header.
cl> chcalpar n0g70106t_raw.fitsThe pset list appropropriate for the image will appear, and the calibration keyword can be modified. The operation performed with chcalpar can be equivalently performed (although in a more cumbersome way) with the general IRAF task hedit; in this case, the extension [0] of the primary header must be explicitly specified:
cl> hedit n0g70106t_raw.fits[0] flatcorr OMIT.
Do not try to edit a keyword in an extension header unless you are certain that the keyword does not reside in the primary header. (See "Header Keywords and Inheritance" on page 2-6).
If you use both extension and image section syntax together, the extension name or number must come first enclosed in one set of brackets, and the image section specification in a second set of brackets.