The slit illumination correction procedure for cross-dispersed grism data is similar to that described for long-slit grism reductions (§8).
Slit illumination correction images for each order of cross-dispersed grism data are formed from geometrically transformed sky frames, or comparison frames in the case of twilight sky measurements, using the cspxillum task, which calls the noao.twodspec.illum task. The inputs required are a list of the base names of the SKY frames, and the base name of the output illumination files. For example,
cspxillum @skyfiles illum_jh
The output illumination function file names are formed by appending .i## to the specified output base name, where ## is the number of the spectral order.
The cspxillum task has the parameters listed below. The comb_opt parameter defines the way in which the individual sky frames in the list are combined. comb_opt should be average if the number of sky images is less than about 5 and median if greater than about 5. The statsec parameter defines the image section within the sky frame over which the illumination profile is computed. This should be set to the region of the image illuminated by the orders.
I R A F
Image Reduction and Analysis Facility
PACKAGE = caspir
TASK = cspxillum
skies = @skyfiles List of base sky frame names
illfile = illum_jh Output illumination frame
(comb_op= average) Type of combine operation
(statsec= [15:40,*]) Image section for computing profile
(verbose= yes) Verbose output?
(imglist= )
(mode = ql)
For each order of cross-dispersed grism data, you are asked Determine illumination interactively for illfile.i13 (yes):. Answering yes to this question causes an average spectrum to be plotted in the graphics display. You are required to mark the range of the bin that will be used for determining the average profile along the spatial direction. The default is to use the entire spectrum, but this can be changed using cursor commands in the graphics display window. The available commands are listed in §8. Type q to proceed to fitting the spatial profile.
You are then asked the question Determine illumination interactively for illfile.i13[15:40,*] at bin 1 (yes):. Answer yes to this question and the spatial profile is plotted in the graphics display window. A fit to the profile is made using the IRAF icfit task. The parameters of the fit can be changed interactively using the interactive curve fitting cursor commands listed below. Type d to delete a point. Type f to perform the fit. Type r to redraw the graph. The fitting function can be changed by typing, e.g., :function chebyshev. The order of the fit can be changed by typing, e.g., :order 2. The number of samples being averaged to form the fitted data can be changed by typing, e.g., :naverage 2. The values of all fit parameters can be seen by typing :show. Type q to exit the interactive curve fitting task when a suitable fit has been obtained.
The object, sky, and comparison images for a dataset can be corrected for non-uniform slit illumination by setting the illumination flag in redxspec, and setting the illfile parameter to the appropriate illumination correction base filename. A typical redxspec parameter list for applying the slit illumination correction in the file illum_jh to spectra with the base name sp175 is shown below.
I R A F
Image Reduction and Analysis Facility
PACKAGE = caspir
TASK = redxspec
(images = @tfiles) List of CASPIR input images to reduce
(spectru= sp175) Base name of spectrum file
(linear = no) Linearize data?
(combine= no) Combine individual 2D spectra?
(flatten= no) Divide by flatfield?
(fixbad = no) Fix known bad pixels?
(clean = no) Interactively clean additional pixels?
(transfo= no) Straighten orders and subset?
(illumin= yes) Correct non-uniform slit illumination?
(extract= no) Extract 1D spectra?
(fluxcal= no) Flux calibrate spectra?
(merge = no) Merge spectrum segments?
(flatdiv= no) Divide by flat spectrum star?
(plot = no) Plot merged spectra?
(bias = bias) Bias frame to use
(dark = dark180) Dark frame to use
(obstype= osso) Type of observation made
(zerosec= [190:195,10:90]) Zero level image section
(flatfil= flat_jh) Flatfield frame to use
(badfile= caspirdir$grism) Bad pixel file
(badtype= interp) Type of bad pixel correction
(illfile= illum_jh) Illumination frame to use
(reffile= ) Comparison extraction reference file
(fluxspe= ) Flux calibration spectrum to use
(weights= ) Merge weighting function file to use
(flatspe= ) Flat spectrum star file to use
(verbose= yes) Verbose output?
(imglist= )
(mode = ql)