n3w2a1wqm_cal.fitsThe first part of the file name (n3w2a1wqm) is the rootname, identifying the dataset to which the file belongs, the second (cal) is the suffix, identifying the type of data the file contains, and the third (fits) indicates that this is a FITS format file. Chapter 2 shows how to access the data contained in NICMOS FITS files; Appendix B explains how to decipher the rootnames of these files and explains why some of them are grouped into data associations. This section describes the different types of files that constitute a NICMOS dataset.
A science data file can contain one or more imsets. For example, an individual NICMOS exposure obtained with the ACCUM mode will generate a *_raw.fits file with one imset; an individual MULTIACCUM exposure with x readouts will generate a *_raw.fits file (and, after calibration, a *_ima.fits file) containing x + 1 imsets, including the zeroth readout. The files *_cal.fits and *_mos.fits files always contain one imset.
In a MULTIACCUM exposure, the order of the imsets in the file is such that the result of the longest integration time (the last readout performed on-board) occurs first in the file (first imset), the one readout before the last is the seond imset, and so on; the zeroth readout is the last imset (i.e., the order is in the opposite sense from which they are obtained).
The only contents of the primary header are header keywords. There is no image data in the primary header. The keywords in the primary header are termed global keywords because they apply to the data in all of the file extensions. The organization and location of header keywords is explained in detail later in the chapter.
NICMOS Science Data File Contents
Figure 15.1: Data Format for ACCUM, RAMP, BRIGHTOBJ and ACQ Modes

Figure 15.2: MULTIACCUM Mode Data Format

Science Image
This image contains the data from the detector readout. In ACCUM, RAMP, and BRIGHTOBJ modes the image received from the instrument is the result of subtracting the initial from the final readouts of the exposure. In MULTIACCUM mode the images received are the raw (unsubtracted) data corresponding to each detector readout. In this case the subtraction of the zeroth read is done in the ground calibration pipeline task calnica (see Chapter 16). In raw datasets the science array is an integer (16-bit) image in units of DNs (counts). In calibrated datasets it is a floating-point image in units of DNs per second (count rates). Error Image
The error image is a floating-point array containing the statistical uncertainty associated with each corresponding science image pixel. For all observing modes except RAMP, this image is computed in the ground calibration pipeline task calnica as a combination of detector read noise and Poisson noise in the accumulated science image counts (see Chapter 16) and is expressed in terms of 1
uncertainties. In RAMP mode the instrument computes the variance for each pixel value from the intermediate readouts and returns the variance image to the ground where it is stored in the raw science data file (*_raw.fits). In this case the ground calibration pipeline simply converts the variance values in the raw data file to standard deviations. Data Quality Image
This integer (unsigned 16-bit) array contains bit-encoded data quality flags indicating various status and problem conditions associated with corresponding pixels in the science image. Because the flag values are bit-encoded, a total of 16 simultaneous conditions can be associated with each pixel. Table 15.3 lists the flag values and their meanings.
Number of Samples Image
The SAMP image is an integer (16-bit) array containing the total number of data samples that were used to compute the corresponding pixel values in the science image. For RAMP mode observations this information is computed by the instrument and sent to the ground to be recorded in the raw data file (*_raw.fits). For ACCUM and BRIGHTOBJ modes, the number of samples contributing to each pixel is set to a value of 1 in the raw data file. For MULTIACCUM mode the sample values in the raw and intermediate data files are set to the number of readouts that contributed to the corresponding science image. Because the number of samples in the raw images for MULTIACCUM, ACCUM and BRIGHTOBJ modes have one number for all pixels of an imset, the array is usually not created (to save on data volume), and the value of the sample is stored in the header keyword PIXVALUE in the SAMP image extension (see Table 15.6 below).
In MULTIACCUM calibrated data files (*_cal.fits) the SAMP array contains the total number of valid samples used to compute the final science image pixel value, by combining the data from all the readouts and rejecting cosmic ray hits and saturated pixels. In this case the sample array may have different values at different pixel locations (less or equal to the total number of samples in the MULTIACCUM sequence), depending on how many valid samples there are at each location.
Integration Time Image
The TIME image is a floating-point array containing the effective integration time associated with each corresponding science image pixel value. These data are always computed in the ground calibration pipeline for recording in the raw data file. For ACCUM and BRIGHTOBJ mode observations each pixel has the same time value. For MULTIACCUM observations each pixel for a given readout has the same time value in the raw and intermediate data. Therefore, the same data-volume-saving technique is used in these cases: the array is not created and the value of the time is stored in the header keyword PIXVALUE in the TIME image extension (see Table 15.6 below). For RAMP mode observations the integration time for each pixel is computed from the exposure time per sample and the total number of samples contributing to each pixel; a TIME array is thus returned to the ground.
In MULTIACCUM calibrated data files (*_cal.fits) the TIME array contains the combined exposure time of all the readouts that were used to compute the final science image pixel value, after rejection of cosmic ray and saturated pixels from the intermediate data. As in the case of the SAMP array, the TIME array can have different values at different pixel locations, depending on how many valid samples compose the final science image in each pixel.
15.1.3 Auxiliary Data Files
The *_spt.fits, *_trl.fits, *_pdq.fits, the *_asn.fits, and the *_asc.fits files are termed auxiliary data files. They contain supporting information on the observation, such as spacecraft telemetry and engineering data, assessment of the quality of the observation, calibration information, and information on the associations present in the observations. Association Tables
The association tables, *_asn.fits and *_asc.fits, are STSDAS tables which are created when a particular observation generates an association of datasets (see "Associations" on page B-4). In particular, the *_asn.fits table is generated by OPUS, and contains the list of datasets which make up the association (e.g., from a dither or chop pattern). The *_asn.fits tables are the inputs to the pipeline calnicb, which creates the mosaiced or background subtracted images (*_mos.fits files) from the input datasets. All the datasets must have been processed through the basic pipeline data reduction (calnica) before being processed through calnicb. In addition to the output science image(s), calnicb produces another associations table (*_asc.fits), which has the same content as the *_asn.fits table, along with additional information on the offsets used by the pipeline for reconstructing the science image. For mosaics (dither patterns), there is only one final image produced, with file name *0_mos.fits. For chop patterns, in addition to the background-subtracted image of the target (*0_mos.fits), an image for each background position will be produced; the file names of these background images are *1_mos.fits, *2_mos.fits,..., *8_mos.fits (A maximum of eight independent background positions is obtainable with the NICMOS patterns, see the NICMOS Instrument Handbook for details).
Support File
The support files *_spt.fits contain information about the observation and engineering data from the instrument that was recorded at the time of the observation. A support file can have multiple extensions within the same file; in the case of a MULTIACCUM observation there will be one extension for each readout (i.e., each imset) in the science data file. Each extension in the support file holds an integer (16-bit) image. Trailer File
The trailer files *_trl.fits contain information on the calibration steps executed by the pipelines and diagnostics issued during the calibration. Processing Data Quality File
The processing data quality files (*_pdq.fits) contain general information summarizing the observation, a data quality assessment section, and a summary on the pointing and guide star lock. They state whether problems where encountered during the observations, and, in case they were, describe the nature of the problem. There is one *_pdq.fits file produced for each dataset, and, in case of associations, one *_pdq file for each NICMOS product (i.e., each *_mos.fits file).