next up previous contents
Next: Combining Individual Images Up: Long-Slit Grism Data Reduction Previous: Linearity Correction

Defining The Geometrical Transformation

Spectra recorded with the long-slit grisms in CASPIR have tilted slit images which may vary along the spectrum. This distortion must be corrected in order to accurately align the dispersion direction with the image columns and the spatial direction with image lines. Files containing fits to these geometrical distortions for each grism are distributed along with the IRAF CASPIR package. However, it is advisable to define new transformations for each observing run.

Curvature in the spectral direction can be traced using sky-subtracted images of stellar spectra placed at different positions along the slit. Spectra at 11 evenly-spaced positions along the long-slit are adequate. Slit tilt is traced using spectral images of arc lamps. These also serve to establish the wavelength calibration.

First, form a SKY frame by median combining the individual stellar spectral images, then form the stellar curvature reference frame by subtracting this SKY frame from the star images. Then, form xenon and/or argon arc lamp frames by subtracting lamp on and lamp off pairs, according to the following example:

delete tfiles
csplist list first=ir078 num=11 > tfiles ; tail tfiles
cspcombine @tfiles sky_k comb_opt=median
cspflat @tfiles sky_k star_k

cspflat ir005,ir006 ir007,ir008 xenon_k
cspflat ir001,ir002 ir003,ir004 argon_k

Note that the geometrical transformation is best defined using frames that have not been flatfielded.

The geometrical transformation for a particular grism is defined using the cspgtrans task which has the parameters listed below.

                                   I R A F  
                    Image Reduction and Analysis Facility
PACKAGE = caspir
   TASK = cspgtrans

curve   =               star_k  Curvature reference frame to use
xenon   =              xenon_k  Xenon lamp frame to use
argon   =              argon_k  Argon lamp frame to use

(verbose=                  yes) Verbose output?
profile =                       Enter the profile section to use
(mode   =                   ql)

The curve parameter defines the stellar curvature reference frame name, the xenon parameter defines the xenon arc lamp filename, and the argon parameter defines the argon arc lamp filename. At least one arc lamp frame must be specified. Line lists for the xenon and argon arc lamps are distributed with the IRAF CASPIR package in the files xenon.dat and argon.dat.

The cspgtrans task first displays the curvature reference frame, and an average profile through the first, middle, or last ten lines of the image, as specified by the profile parameter, is displayed in the graphics display using the noao.twodspec.identify task. Mark the position of the star by using the cursor and typing `m'. Enter the appropriate column number, and type `q' to exit this section. cspgtrans then uses noao.twodspec.reidentify to trace the spectrum. Answer `yes' to the question Do you want to save to database?. The cspgtrans task then displays the xenon arc lamp spectum image (if one was specified) and uses noao.twodspec.identify to display an average profile through the central three columns (along the dispersion). Referring to the arc lamp spectra in Figs. 38-40 of Appendix J, type `m' to mark the locations of a few emission lines and enter their wavelengths in Angstroms. Then type `f' to obtain a preliminary fit to the wavelength calibration. Type `q' to exit the fit routine, and then `l' to automatically locate other arc lines. Delete erroneous identifications by typing `d'. Use the window commands `w t' and `w b' to change the top and bottom plot values, and `w a' to autoscale the plot. Fit the wavelength calibration again, and type `q' to exit the fit routine and another `q' to exit the identify routine. cspgtrans then uses noao.twodspec.reidentify to trace the slit images. The cspgtrans task then repeats the identification process for the argon arc lamp image (if one was specified). Answer `yes' to Fit interactively (yes)?, and remove erroneous data points and points off the ends of the slit using the `d' key; typing `d' followed by a `p' deletes a single point, typing `d' followed by an `x' or a `y' deletes all points at that constant x or y. The fit is best displayed by looking at the residuals as a function of x position; type `x' followed by `x', `y' followed by `r', and then `r' to redisplay the plot. Redo the fit by typing `f'. Display the fit itself by typing `x' `x', `y' `y', and then `r' to redisplay the plot. When a satisfactory fit has been obtained, exit the fit routine by typing `q'. Then answer `yes' to Write coordinate map to the database (yes)?.

The fit parameters are stored in a local subdirectory named database/ of the current directory, and in the database directory pointed to by the IRAF database$ environment variable. The x and y fits for a particular grism are stored in files with names like fcK_grism_10x and fcK_grism_10y in those directories.


next up previous contents
Next: Combining Individual Images Up: Long-Slit Grism Data Reduction Previous: Linearity Correction

Kabal
Thu Jun 5 16:44:21 EST 1997