[Top] [Prev] [Next] [Bottom]
21.2 Structure of calstis
Calstis consists of a series of individual modules which:
- Orchestrate the flow through the pipeline.
- Perform basic two-dimensional image reduction.
- Reject cosmic rays from CCD data.
- Process the contemporaneously obtained wavecal data to obtain the zeropoint shifts in the spectral and spatial directions.
- Perform spectroscopic calibration, with wavelength and flux calibration.
- Perform final processing.
Table describes in more detail the individual modules in calstis and what they do. The IRAF task that can be used to run a particular segment of the pipeline independently is also provided (see "Rerunning Subsets of the Calibration Pipeline" on page 21-33).
Calstis Module Description Summary
IRAF Task
|
Description of Processing Step
|
Module1
|
---|
Full Pipeline
|
calstis
|
"Wrapper" program calls each of the calstis tasks as needed, according to the switches set in the primary header of the input file. The calstis constituent tasks can instead be executed independently when recalibrating.
|
calstis0
|
Basic 2-D image Reduction
|
basic2d
|
Basic 2-D image reduction. This step includes overscan subtraction, bias subtraction, dark subtraction, flatfield ing, initializing the data quality array from the bad-pixel table, assigning values to the error array, and computing some simple statistics. Normally, cosmic-ray rejection is applied during the course of basic image processing; however, basic2d can be customized to omit this step and to limit processing to overscan subtraction.
|
calstis1
|
Cosmic Ray Rejection
|
occreject
|
Detect and remove cosmic rays in CCD data. When multiple images at the same pointing have been taken, this module identifies cosmic rays (optionally flagging them in the input file) and co-adds the input images, writing one output image without cosmic rays.
|
calstis2
|
Contemporaneous Wavecal Processing
|
wavecal
|
Determine MSM offset from wavecal. This step is used in conjunction with calstis7, calstis11, and calstis12. Its purpose is to find the offset of the spectrum from the expected location, owing to nonrepeatability of the mode select mechanism. The shift is written into the SCI extension header of the input wavecal image.
|
calstis4
|
|
Subtract science image from wavecal. For CCD wavecal observations taken with the HITM system, the detector is exposed to both the wavecal and the science target. This task reads both the wavecal and science files and subtracts the science data from the wavecal. Following this step , calstis4 can be used to determine the spectral shift.
|
calstis11
|
|
Write spectral shift value to science header. A series of science images (i.e., CRSPLIT or REPEATOBS) and wavecals may have been taken, with the wavecals interspersed in time among the science images. For each image in the science file, this task selects the wavecal in the wavecal file that is closest in time to the science image, and it copies the keyword values for the spectral shift from that wavecal header to the science header.
|
calstis12
|
Spectroscopic Calibration and Extraction
|
x1d
|
1-D spectral extraction. This task is most appropriate for echelle data or for a long-slit observation of a point source. A spectrum is extracted along a narrow band, summing in the cross-dispersion direction and subtracting nearby background values to produce a 1-D array of fluxes for each spectral order. D are not resampled in the dispersion direction; instead, an array of wavelengths is generated. Each output spectrum is written to a separate row of a FITS binary table, together with the arrays of the gross, net, and background count rates.
|
calstis6
|
x2d
|
2-D rectification. This task performs geometric correction for imaging data, or for long-slit spectroscopic data it extracts a 2-D spectrum linear in both wavelength and spatial directions.
|
calstis7
|
Final Processing
|
|
Sum repeatobs data. If multiple MAMA images were taken and combined into one input FITS file, this task can be used to add them together, pixel by pixel. This task would not normally be used for CCD data because they would already have been combined for cosmic ray rejection.
|
calstis8
|
Below we present a series of flow charts which provide a more complete overview of the processing of data through the calstis pipeline, starting with the fundamental step of two-dimensional image reduction.
The first step is to reduce the data through flatfielding and reject cosmic rays or co-add the data as appropriate. Figure 21.1 shows the route taken by CCD and MAMA data.
Figure 21.1: Basic 2-D Image Reduction (First Step in Subsequent Flowcharts)
The calibration beyond the basic 2-D image processing depends upon whether the data are obtained in imaging or spectroscopic mode, as illustrated in Figure 21.2. The primary operations are geometric correction and photometric calibration, and a summation of multiple MAMA exposures if NRPTEXP > 1. The output is a geometrically rectified image with header keywords that specify the photometric calibration. When geometric correction is not applied, the output will be photometrically calibrated flatfielded data with suffix _crj, _flt, or _sfl.
Figure 21.2: Schematic of calstis for Secondary Image Processing
For spectroscopic exposures, calstis will process the associated wavelength calibration (wavecal) exposure to determine the zero point offset of the wavelength and spatial scales in the science image, thereby correcting for the lack of repeatability of the mode select mechanism (MSM) or for thermal drift. The accompanying wavecal observations are stored in the rootname_wav.fits file.
Figure 21.3: Schematic of calstis for Contemporaneous Wavecals
Two-dimensional spectral processing produces a flux-calibrated, rectified spectroscopic image with distance along the slit running linearly along the y axis and dispersion running linearly along the x axis.
One-dimensional spectral extraction produces a one-dimensional spectrum of flux versus wavelength (rootname_x1d.fits), uninterpolated in wavelength space, but integrated across an extraction aperture in the spatial direction. This extraction is currently performed only for echelle short slit -observations in the pipeline. Future enhancements will perform the extraction for point sources in all first-order modes as well.
Figure 21.4: Schematic of calstis for Spectroscopic Data
[Top] [Prev] [Next] [Bottom]
stevens@stsci.edu
Copyright © 1997, Association of Universities for Research in Astronomy. All rights
reserved.
Last updated: 07/01/98 10:22:14