next up previous contents
Next: Flux Calibration Up: Cross-Dispersed Grism Data Reduction Previous: Slit Illumination Correction

Extraction of 1D Spectra

We now have an averaged two-dimensional spectral image for each order of the cross-dispersed grisms. For most applications, we want to extract one-dimensional spectra from these images. In general, residual sky emission lines will also be present in these images. This is because the sky emission line spectrum varies on shorter timescales than our integration time. This sky background is removed during the extraction process by linear interpolation along the slit direction.

One-dimensional spectra are extracted using the redxspec task by setting the extract flag, and optionally defining a value for the reffile parameter. The redxspec task uses the apall task in the IRAF noao.twodspec.apextract package to perform the extraction and background subtraction interactively. It is recommended that users become familiar with the workings of this package. The available cursor commands are listed in §8. Generally, you will want to edit the extraction aperture for each object by setting reffile="". However, this may be difficult for extremely weakly-exposed spectra and is inappropriate for comparison spectra. In these cases, you can use a previously defined extraction aperture from a reference spectrum. If a reference spectrum is to be used, set the reffile parameter to the filename of the reference spectrum. Avoid setting reffile=last to use the apextract last feature when extracting cross-dispersed grism spectra where each order is extracted sequentially.

The extraction process proceeds slightly differently for the different observation types defined by the observation type header entry. If the observation type is abba, the positive object spectrum is extracted interactively, then the corresponding sky spectrum is automatically extracted, and these steps are repeated for an inverted version of the negative object spectrum. For the osso and soos observation types, the object spectrum is extracted interactively, then the sky spectrum is automatically extracted. For comparison spectra, the extraction occurs automatically using the extraction aperture defined by the reference spectrum. The extraction begins with the lowest spectral order in the image and proceeds through each order. The extraction and background aperture definitions used for each object spectrum become the default definitions for extracting the next order. Generally all that is required is to recenter the extraction aperture on the new order.

The extraction process for each order begins by asking Edit apertures for infile.o13? (yes):. Answering yes to this question allows the user to interactively change the default extraction and background subtraction apertures using the apedit task. The full profile perpendicular to the dispersion axis is plotted in the graphics display and the location of the default extraction aperture is indicated, if one is defined. Type m to mark the location of the first extraction aperture at the centroid of the profile peak near the cursor location. Type n to mark the first extraction aperture at the cursor location without centroiding. Type s to shift a predefined aperture to a different location, and optionally centroid the aperture at the new location in response to the question asked. Type c to centroid a predefined aperture. On weakly exposed spectra, the object may not be detectable in the full slit profile. If emission features are present, plot the slit profile only around an emission line by decreasing the number of dispersion lines summed by typing, e.g., :nsum 20, and selecting the location of the cut across the spectrum by typing :line nnn, where nnn is the line number where the feature occurs. To change the lower bound of the extraction aperture, position the cursor at the new position and type l, or type :lower -4 to explicitly set to a value of -4. To change the upper bound of the extraction aperture, position the cursor at the new position and type u, or type :upper 4 to explicitly set to a value of 4. Alternatively, you can set the width of the extraction aperture using the height of the cursor as a threshold to define new upper and lower bounds and type y. Type r to redraw the graph. Define new background sample regions explicitly by typing, e.g., :b_sample -8:-5,5:8, or type b to change the background subtraction sample regions using the cursor. The cursor commands then available are those of the interactive curve fitting task icfit that are listed in §8. Type z to delete the sample region nearest the cursor. Type s to define one side of a new sample region, and s again to define the other side. Type :sample -8:-5,5:8 to set the background subtraction sample regions explicitly from within icfit. To change the order of the fit type :order 1. Type f for a new fit. Type r to redraw the graph. Type q to exit from the interactive curve fitting task. When the extraction and background apertures have been defined, type q to exit the aperture editor.

Answer yes to the question Write apertures for infile.o13 to database (yes): to save the definition. Then answer yes to the question Extract aperture spectra for infile.o13? (yes): to perform the extraction. Answer yes to the question Review extracted spectra from infile.o13? (yes): to display the extracted one-dimensional spectrum for this grism order. Since we have only one aperture, answer yes to the question Review extracted spectrum for aperture 1 from infile.o13 (yes):. Type q to proceed. Then type a carriage return to the question Output image name [use # to skip output] (infile.o13.0001):. The redxspec task will rename this file.

The extracted spectra for each order are stored in a single IRAF multispec format file named by appending .osp, .ssp, or .csp to the base spectrum name for the object, sky, or comparison spectra, respectively. These spectra can be inspected individually using the IRAF splot task and the ) and ( cursor commands to cycle through the orders. The aperture definitions for each order are stored in a database/ sub-directory of the current directory in files with names like apinfile.o13.


next up previous contents
Next: Flux Calibration Up: Cross-Dispersed Grism Data Reduction Previous: Slit Illumination Correction

Kabal
Thu Jun 5 16:44:21 EST 1997