gfreduce (July2009) | gemini.gmos | gfreduce (July2009) |
Other tasks within the Gemini IRAF package which are affected by a given parameter are given in ().
GFREDUCE is a meta script for applying basic reduction steps to GMOS IFU data. Depending on the flags set, GFREDUCE will call the following scripts in sequence: GPREPARE, GIREDUCE, GSCRREJ, GNSSKYSUB, GFEXTRACT, GFTRANSFORM, GFSKYSUB, and GSCALIBRATE. The most important of the parameters of these tasks, especially the names of calibration files, are provided as inputs to GFREDUCE. If a parameter for one of the called tasks is not in the GFREDUCE parameter list and does not involve file names, then in general it can be set directly before GFREDUCE is run (see the examples). The intermediate results are named using the default outpref where possible. Output from GSCRREJ is given a "x" prefix. While it is best to use the standard prefixes for the output file names, the final result can be renamed according to the list given in outimages or a specfic prefix given by outpref.
Intermediate steps are not deleted - the output images may therefore take up significant disk space. The intermediate steps can only be reused if the flags that were set to "yes" to create them are set to "no" and the names of the output image(s) from the intermediate step is given as the input image(s). For example to start at the cosmic ray rejection step, set fl_addmdf=no and all the flats for GIREDUCE to "no". Then give the output image from those steps as the input image. This image is named "rg*" if the default naming was used. This behavior of GFREDUCE will be improved in a future release.
GFREDUCE does provide some functionality in addition to that of the scripts that it links together. If slits is set to the correct slit(s), fl_nodshuffle reflects whether a nod&shuffle slit mask was used, and mdffile="default" (or if slits="header" for newer data), the proper MDF file for that configuration is determined automatically. In this case, mdfdir should be set to the default value of "gmos$data/". Also, GFREDUCE puts loops around GSCRREJ and GFEXTRACT, allowing those tasks to be used on lists of images. Finally, it makes sure that database files are renamed and updated properly if the output images do not use the standard prefixes.
The field-to-slit mapping of the GMOS-S IFU allows the use of the nod&shuffle (N&S) observing mode for improved sky subtraction, especially in the red. One difference when using this mode is the loss of the small IFU field normally used for a sky measurement. Sky subtraction for N&S data can be done in two ways. GNSSKYSUB can be called by setting fl_gnsskysub="yes" (fl_skysub is set to "no" automatically if a N&S output mask was used). If data were taken at multiple DTA X positions but the same spatial position then images can be combined and the sky can be subtracted using GNSCOMBINE. In this case the spectra should be gprepared, bias-subtracted, and processed by GNSCOMBINE before running GFREDUCE to do the extraction.
After processing with GFREDUCE the data format will have changed according to the processing steps chosen. The tables below give the processing flags and the output data format in terms of the number of science extensions (SCI) and the MDF extension. The MDF extension contains the binary MDF. The flags are listed in the order the reflects the reduction steps. The output format of one step is the input format to the next step. The first table is for data taken with the IFU in 1-slit mode, while the second table is for data taken with the IFU in 2-slit mode. For N&S reductions there is no SKY extension since the sky is subtracted using GNSSKYSUB or GNSCOMBINE before the extraction step and no mean sky spectrum is produced.
IFU 1-slit data -------------------------------------------------- Processing flag Output format -------------------------------------------------- none Raw data: 3 image extensions fl_addmdf+ 3 SCI 1 MDF fl_over+ 3 SCI 1 MDF fl_bias+ 3 SCI 1 MDF fl_crrej+ 3 SCI 1 MDF fl_extract+ 1 SCI 1 MDF fl_gsappwave+ 1 SCI 1 MDF fl_wavtran+ 1 SCI 1 MDF fl_skysub+ 1 SCI 1 MDF 1 SKY fl_fluxcal+ 1 SCI 1 MDF 1 SKY --------------------------------------------------IFU 2-slit data -------------------------------------------------- Processing flag Output format -------------------------------------------------- none Raw data: 3 image extensions fl_addmdf+ 3 SCI 1 MDF fl_over+ 3 SCI 1 MDF fl_bias+ 3 SCI 1 MDF fl_crrej+ 3 SCI 1 MDF fl_extract+ 2 SCI 1 MDF fl_gsappwave+ 2 SCI 1 MDF fl_wavtran+ 1 SCI 1 MDF fl_skysub+ 1 SCI 1 MDF 1 SKY fl_fluxcal+ 1 SCI 1 MDF 1 SKY --------------------------------------------------
After processing with GFREDUCE, science images may be reconstructed using GFDISPLAY, or resampled onto a 3-D datacube using GFCUBE.
1. Do all steps through extraction for a GCAL flat.
cl> set rdata=/net/mapu/staging/gmos/ cl> set gcalib=/net/mapu/staging/dataproc/gmos/CommCalib/ cl> gfreduce.rawpath="rdata$2001sep09/" cl> gfreduce.bias="gcalib$rgN20010825S129_bias.fits" cl> gfreduce N20010908S092 verb+ fl_over- fl_bias+ fl_trim+ \
>>> fl_extract+ fl_wavtran- fl_skysub- fl_flux- fl_inter-
2. Apply all reduction steps except flux calibration to a standard star while setting some of the GFSKYSUB parameters beforehand.
cl> gfskysub.combine="median" cl> gfskysub.reject="minmax" cl> gfskysub.nlow=0 cl> gfskysub.nkeep=1 cl> gfreduce N20010908S091 verb+ fl_over- fl_bias+ fl_trim+ \
>>> fl_extract+ fl_wavtran+ fl_skysub+ fl_flux- fl_inter- \
>>> refer=exrgN20010908S092 trace- \
>>> response=exrgN20010908S092_resp112 wavtran=ergN20010908S0933. After determining the flux calibration using GFAPSUM and GSSTANDARD, apply the flux calibration to the standard star to check the results.
cl> gfreduce astexrgN20010908S091 rawpath="" verb+ \
>>> fl_addmdf- fl_over- fl_bias- fl_trim- fl_gscrrej- \
>>> fl_extract- fl_wavtran- fl_skysub- fl_flux+ fl_inter- \
>>> sfunc=sens.fits extinct=extinct.dat4. Sky-subtract and extract a N&S observation using a reference flat to define the apertures. cl> gfreduce.bias="gcalib$gS20040228S0001_bias.fits" cl> gfreduce.fl_gscrrej=no cl> gfreduce.fl_wavtran=no cl> gfreduce.fl_fluxcal=no cl> gfreduce S20040229S0050.fits fl_gnssky+ fl_skysub- >>> fl_extract+ fl_gsappwave+ mdffile="gsifu_ns_slits_mdf.fits" \
>>> trace- recenter- reference=ergS20040229S0049