[Top] [Prev] [Next] [Bottom]
16.4 Mosaicing: Calnicb
Observing strategies with NICMOS vary according to the nature of the target object and of the wavelength chosen for the observation. Extended objects may require mosaicing. Long wavelength observations will need chopping onto the sky to remove the telescope thermal background from the target frame. Multiple repetitions of the same exposure may be requested to improve cosmic ray removal, to control statistical fluctuations, and to increase the signal-to-noise on one target while avoiding saturation on another. Dither (mosaicing) and chop patterns of exposures are specified at the Phase II proposal level via the optional PATTERN parameter; multiple exposures at the same pointing are specified in Phase II by setting the Number_of_iterations to a value greater than one. All these options (which can also be set simultaneously) create an association of datasets (see "Associations" on page B-4).
The calnicb task (Figure 16.4) produces the combined, or mosaiced, image from the multiple images contained in a NICMOS association. The task also performs background subtraction and source identification on the images in the association.
Figure 16.4: Conceptual calnicb Pipeline
16.4.1 Input Files
Two levels of input data are needed by calnicb:
- The association table (assoc_id_asn.fits): this is a table containing three columns with the list of members in the association and the relevant information on the association type, as given in Table 16.1.
Columns of the Association Table (input to calnicb):
The header of the assoc_id_asn.fits table also contains the setting of the keywords which control the background illumination pattern correction (ILLMCORR); the keywords read are: ILLMCORR (whether or not the correction must be performed) and ILLMFILE (reference file name for the illumination correction); these are explained in Chapter 15. At the time of this writing (August 1997) we have not been able to measure any such spatial variations, and the ILLMFILEs have not yet been populated.
- The input images (ippssoot_cal.fits): the science data images which are part of the association, as listed in the first column of the association table. The images are usually the calibrated outputs of calnica.
- The support files (ipppssoot_spt.fits), containing the engineering information, so that calnicb can transfer this information to the output support files.
16.4.2 Output Files
Calnicb produces two levels of outputs:
- An updated copy of the association table (assoc_id_asc.fits): this copy of the assoc_id_asn.fits file contains additional information about the processing that took place. The assoc_id_asc.fits file contains four additional columns, listed in Table 16.2.
Additional Columns of the output Association Table:
Additional information contained in the header of the assoc_id_asc.fits table is the MEAN_BCK keyword, which gives the constant background signal level subtracted from all images in the association.
- One or more output mosaic images (assoc_idn_mos.fits): the number of output mosaic images depends on the pattern. The target field is always contained in the assoc_id0_mos.fits file. Patterns which involve chopping onto the sky to produce background reference images result in multiple assoc_idn_mos.fits files after processing through calnicb. In these cases, the target is still contained in the assoc_id0_mos.fits file; for each background position an additional mosaic, assoc_idn_mos.fits with n=1 to 8, is created.
- One assoc_id_spt.fits support file for each assoc_id_mos.fits file created.
16.4.3 Processing
The basic philosophy of the calnicb algorithm is to remove the background from each image after source identification, to align the images by calculating offsets, and to produce the final mosaic. The processing steps of calnicb can be summarized as follows:
- Read the input asn table and input images.
- Determine processing parameters from keyword values.
- Combine multiple images at individual pattern positions.
- Identify sources in the images.
- Estimate and remove the background signal.
- Create a mosaic image from all pattern positions.
- Write the output association table and mosaic images.
The sections below discuss steps 2 through 6 in greater detail.
Processing Parameters
Header keywords from the input *_cal.fits images are read and evaluated in order to guide the processing. One set of keywords (Table 16.3) pertains to the association as a whole and therefore are read only once from the first input member image.:
A second set of header keywords (Table 16.4) are specific to each member of the association, and must be read from each single input image.:
Based on this information, an inventory is taken of what input images exist, where they belong in the pattern, how many there are at each pattern position, which images are from the target field, which ones are from background fields, and which output mosaic image each input image will eventually end up in. As part of the input process, the appropriate ILLMFILE reference file is loaded.
Combination of Multiple Exposures
If there is more than one image at any pattern position (NUMITER > 1), the multiple images at each position are first registered and then combined into a single image. The coordinates (as determined by the WCS keywords) of the first image at a given pattern position are used as a reference for the registration. The offsets to all other images at that pattern position are first computed by comparing their WCS data, and then refined using a cross-correlation technique, down to a level of 0.15 pixels. The cross-correlation technique employes an algorithm which minimizes the differences between fluxes in the images. The computed offsets, in units of pixels, are recorded in the output association table. After determining the relative offsets, the images are aligned using bilinear interpolation and are then combined on a pixel-by-pixel basis. The combined pixel values are computed as a weighted mean of all unflagged (i.e., DQ = 0) samples, using the input image ERR values as weights. If three or more samples are present, iterative
-clipping is performed to reject outliers. The number of samples used at each pixel and the total integration time are retained.
Source Identification
The source identification step is used for excluding sources when the background in the images at each pattern position is estimated. The images at each pattern position are searched for pixels suspected to contain signal from a source. The mean signal level in the image is computed and pixels that are more than 3
above the mean are searched for. Spurious results, such as pixels containing cosmic-ray hits, are filtered out by searching neighboring pixels and only retaining those that have two or more neighbors that are also above the threshold. The DQ flag of the source-affected pixels is then set to 1024.
Background Estimation and Removal
The background signal is estimated and removed from the images at each pattern position. Two types of background are subtracted from the images:
- A constant background signal level, which is estimated from the images themselves.
- The two-dimensional residual signal that may exist due to spatial variations in the thermal emission of the telescope and instrument; this is removed by subtracting the ILLMFILE reference image from each image (this second step can be turned on or off via the ILLMCORR keyword in the association table header). At the time of this writing (August 1997) we have not been able to measure any such spatial variations, and the ILLMFILEs have not yet been populated.
The constant background signal level is estimated and removed as follows.
- With chop patterns, the mean and standard deviation of the signal in the image at each chop position is computed. In addition to excluding bad and source-flagged pixels, the calculation of the mean also uses iterative
-clipping to reject outliers.
- With dither-only patterns, or with multiple-exposure single pointings, the mean and
of the target images is computed. The result for each image is compared to the estimate provided by calnica, which is stored in the BACKEST1 header keyword of each image. The value computed by calnicb is accepted if it is less than 5
deviant from that of calnica, otherwise the calnicb value is assumed to be biased by the presence of sources and the calnica value is substituted for it.
- The global mean and standard deviation of the background is computed from the values of each image, using iterative
-clipping to reject outliers.
- The final mean background value is subtracted from all images (both target and background images, if present).
Mosaic Construction
Mosaic (MOS) images are created for each independent pointing within the pattern. For example, a combination DITHER-CHOP pattern will produce one mosaic image out of the dithered pattern at each CHOP location on the sky. Each mosaic image is created as follows:
- The relative offsets between images within the mosaic are computed from their WCS information and refined using cross-correlation (as in the case of multiple exposures at each pattern position, see above). The first image in the list for each mosaic is used as a reference image.
- An empty mosaic image is created with x and y dimensions large enough to encompass the maximum offsets in each direction.
- Pixel values in the mosaic image are computed by combining samples from overlapping images. The individual images are aligned using bilinear interpolation and the value at a given mosaic pixel location is computed from the error-weighted mean of the samples at that location. Samples flagged as bad are excluded and, if three or more samples are present, iterative
-clipping is used to reject remaining outliers. The number of samples retained for a given pixel and their total integration time is recorded in the SAMP and TIME images. If all samples are rejected for a pixel, the mosaic image SCI, ERR, SAMP, and TIME values are set to zero and a combination of all DQ flags is retained.
[Top] [Prev] [Next] [Bottom]
stevens@stsci.edu
Copyright © 1997, Association of Universities for Research in Astronomy. All rights
reserved.
Last updated: 11/13/97 17:19:03