Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.stsci.edu/documents/dhb/web/c18_niccalib.fm5.html
Дата изменения: Tue Nov 18 00:20:23 1997
Дата индексирования: Sat Dec 22 14:48:36 2007
Кодировка:

Поисковые слова: п п п п п п п п п п
[Top] [Prev] [Next] [Bottom]

16.5 Grism Data Reduction: Calnicc

Calnicc is an IDL program designed for the automatic extraction of spectra from NICMOS multi-object grism images. The basic capabilities of the program are the following. Objects are identified on a direct image and classified as stars or galaxies using a neural network approach implemented as the SExtractor program (Bertin and Arnouts, 1996, A & A Suppl. 117, 393). The positions of the objects are used to extract spectra from a grism image of the same region. After extraction, the spectra are wavelength calibrated, flat-fielded, and flux calibrated. The extracted spectra are corrected for contamination from nearby objects. Subsequently, the extracted spectra are automatically searched for emission and absorption lines, and the continuum level of each spectrum is determined. Figure 16.5 shows the flow chart for calnicc.

Figure 16.5: Flowchart of calnicc Processing

16.5.1 Input Files

Calnicc expects two input files:

16.5.2 Output Files

A number of outputs are generated by calnicc:

  1. A FITS table containing the extracted spectra (image_tab.fits). This file contains the successfully extracted spectra; it consists of a primary header and a series of table extensions, each extension consisting of a header and the associated table. There is one table extension for each spectrum extracted. The primary header of the file contains the relevant information regarding the observation, namely a subset of the keywords in the primary headers of the input direct and grism images. The table extension header contains keywords relevant for the individual spectrum; the keywords describe: the content of the table (the list of columns), the nature and position of the object, and the characteristics of the spectrum (line positions and fluxes, continuum level, etc.). The associated table contains five columns: the wavelength vector, the flux vector, and three vectors of the statistical, deblending, and total errors from the extraction process.
  2. Postscript files of the extracted spectra (image_n.ps). The files contain graphical representations of the extracted spectra. One postscript file for each spectrum is generated, where n is a sequential number starting with 0.
  3. Background image (image_po.fits). This file is equivalent to the original grism image, except that all pixels used in the spectra extraction are replaced by the surrounding background level.
  4. Background identification image (image_bg.fits). This is an image where the pixels used in the background estimate calculation are highlighted.
  5. The catalog of objects (calnicc.cat). This is a list of all the objects whose spectrum has been successfully extracted. For each object the catalog reports information about its position, nature, and characteristics of the extracted spectrum.
  6. The log file (calnicc.log). The log file contains statistics on the calnicc processing.

16.5.3 Processing

Calnicc was developed using the Interactive Data Language (IDL) software. However the C program SExtractor (Bertin and Arnouts, 1996) is used for source object detection. Below a brief description of the algorithms used at each step of the processing is given, following the basic outline of the flow chart in Figure 16.5.

Object Detection and Classification

After both the direct and grism images have been read by the program, calnicc checks whether there is a background estimate in the header of the *_cal.fits images and subtracts it from the data, if present.

A third-party program, SExtractor is used then to detect and classify (point-like or extended) objects on the direct image. This program is thoroughly documented in the SExtractor 1.0 User's Guide. SExtractor does not use the data quality flags or the error arrays to perform the detection, and spurious objects may be introduced in the catalog. To remove spurious detections, the pixels where the object lies are compared to the quality flag array. If the ratio of bad pixels to the total number of pixels used by the object is above a user-defined threshold, the object is considered as spurious and not processed any further. In addition, the total flux within any object is compared to the quadratic sum of the error estimates for the individual pixels within the object. Again, a user supplied threshold for the significance is used to remove spurious or weak objects.

The grism images are also searched for additional sources. Grism images may yield objects which are located outside of the detector (and therefore are not present in the direct image), but have part of the spectrum on the grism image. Or objects which have most of the flux contained in a single spectral line; in this case, the usually short exposure time of the direct image might not be enough to detect the object, while the typically longer exposure time of grism image may allow the detection. The grism image is prepared by replacing pixels used by previously detected objects' spectra with the background level. Subsequently, DAOFIND is used to find objects more than DAOTHRESH x above the background, where is the rms of the image after removing the spectra. Since no zero point for the wavelength scale is known for those spectra, the objects' location is simply noted in the log file, but no attempts are made to extract their spectra.

Background Subtraction

After source identification, an estimate of the two-dimensional background level is derived and removed from each image.

The grism image is not flat-fielded and the QE variations across the NICMOS detectors are strong, implying that a significant structure is present in an image of blank sky. The QE variations depend significantly on the wavelength, and the expected background in the grism image will depend on the spectrum of the background in space. The present version of calnicc uses a pre-computed model of the background in space, which will be replaced by measures of the blank sky when these data become available. The model used for the background estimate includes three different thermal sources:

Spectra Extraction

Wavelength Calibration

Both the dispersion relation and the deviation of the spectra from a straight line (distortion) are parametrized as third degree polynomials. The coefficients of the polynomials and the orientation of the spectra relative to the direction of the rows are contained in the reference file grismspec.dat. The dispersion relation is given by:

Eq. 16.2

where x is the deflection in pixels relative to the position of the object in the direct image and is the corresponding wavelength.

The distortion of the spectra is parameterized as:

Eq. 16.3

where r is the distance of a pixel (x,y) from the object of coordinates (xo, yo) and y is the deviation in pixels of the spectrum from a horizontal line. The alignment of the spectrum is taken into account by rotating the grism image around the object position (xo, yo) prior to the extraction. The distortions in the spectra are taken into account by introducing a corresponding distortion in the weights used for the extraction.

Flux and Error Bars

Once objects on the images have been detected, their spectra can be extracted. Extraction of spectra is accomplished by using a weight matrix to calculate the flux vector for each wavelength. The flux is then given by:

Eq. 16.4

where the sum over the flux gji of all pixels at wavelength is performed with weights wji. The weights used to compute the spectra depend on the size of the objects. Two scenarios are handled by calnicc: point sources and extended objects (e.g., galaxies). For point sources, the weights are computed from simulated PSFs generated via the TinyTim software. The weights are optimal for point sources with flux-independent noise, namely, background dominated. For extended objects, the weight matrix is built from the direct image, under the assumption that the shape of the object is independent of wavelength. The size and orientation of the object is computed from the direct image using the moments of the image. The weight matrix is then created by summing up all the pixel values in a given row (fixed wavelength) of the grism image that fall within the ellipse defined by the size and orientation the object in the direct image.

The error estimate ji for each pixel is taken from the ERR array of the input grism image. The error estimate j for each wavelength is then the weighed quadratic sum over the errors of all pixels at constant wavelength.

Flatfielding of Spectra

After the spectra are extracted, the fluxes are corrected for the variations of the quantum efficiency of the detector (flatfielded). The QE variations depend both on the wavelength and on the position of the object on the detector. Because of this wavelength dependence, the flatfielding cannot be performed before the spectra are extracted. The correction factors are derived through interpolation from a set of monochromatic flatfield images stored as a single FITS file called nicmosFF.fits.

Deblending of Overlapping Spectra

Since the NICMOS grisms are slitless, overlaps among different spectra are likely to happen. The strategy of observing the same target at different telescope roll angles helps removing overlap in many instances. In addition, calnicc has been designed to deblend the spectra-to remove or minimize contamination of one spectrum from another.

The deblending algorithm is described in detail in the calnicc manual. The basic requirement for the algorithm to work is that, at each wavelength, different spatial portions of the spectrum to be deblended have different levels of contamination. The deblending algorithm relies on the assumption that the shape of the object is the same at all wavelengths. The deblending procedure produces also an error estimate which is reported in the output FITS table and indicated in the postscript file containing the spectrum.



[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