For Nod and Shuffle Reductions, check here.
This is the method that worked best for our data; this may not be true for other data. When in doubt, e-mail the Gemini Help Desk.
This page has been prepared by Kelle Cruz and Anne Sweet. If you find this information useful for reducing data that later appears in publication, please consider acknowledging this page.
Also see the reduction method of Eduard Westra.
Get all data prepared and organized
- Download data, sort it by type, gprepare it and move to working directory. see gemini_getfiles.txt.
- GPREPARE the data:
- grepare @objects.lis rawpath=/datapath/rawdata outpref=/filepath/workingdirectory/gt fl_addm+ fl_vardq-
Make biases, flats, and arcs
- Make bias. See gbias.txt - ONLY FOR OLD DATA WHERE BIAS WAS NOT PROVIDED (ex: S20070913S0213_bias.fits)
- gbias @bias.lis bias.fits => bias.fits cleanup: mv gb* proc_images/ - Make FLATS - gemini_flats.txt.
- gsflat @flat_a.lis flat_a fl_answe+ fl_over+ fl_trim+ fl_bias+ fl_fixpix+ bias=gS20070913S0213_bias.fits fl_inte+ fl_dete+ - gsflat @flat_b.lis flat_b fl_answe+ fl_over+ fl_trim+ fl_bias+ fl_fixpix+ bias=gS20070913S0213_bias.fits fl_inte+ fl_dete+ -When prompted: fitline = 200-300 for standard reductions order for each chip: 1,1,6-9 for GS 1,3,6-9 for GN => flat_a, flat_b cleanup: mv gfgs*,gf*,flat*.lis into procimages/ - Make ARCS - gemini_arc.txt.
- gsreduce @arcs.lis fl_trim+ fl_bias+ fl_gmosaic+ fl_gsappwave+ fl_cut+ bias=gS20070913S0213_bias.fits - gswavelength gsgaS20070913S0152.fits gswavelength gsgaS20070913S0153.fits => 2 gsga (with two central wavelengths) cleanup: mv ga* proc_images/
- Make bias. See gbias.txt - ONLY FOR OLD DATA WHERE BIAS WAS NOT PROVIDED (ex: S20070913S0213_bias.fits)
Reduce targets, flux standards, and telluric
- Make lists of observations according to central wavelength
- hselect > objects_a.lis images = *.fits[0] select = $I expr = obstype ?= 'OBJECT' && grwlen == 810 - hselect > objects_b.lis images = *.fits[0] select = $I expr = obstype ?= 'OBJECT' && grwlen == 815 - GSREDUCE - gsreduce.txt.
- reduce in steps: gsreduce @objects.lis fl_over+ fl_trim+ fl_bias+ ovs_fli+ bias=gS20070913S0213_bias.fits gsreduce @objects_a.lis fl_flat+ flat=flat_a gsreduce @objects_b.lis fl_flat+ flat=flat_b gsreduce @objects.lis fl_gmos+ fl_fixpix+ fl_gssap+ fl_cut+ Don't forget to update prefixes in .lis each time! => gsgsgsgt* cleanup: mv gt*, gsgt*, gsgsgt*, flat_*.fits, bias to proc_images/ - FOR GEMINI SOUTH - FIX PIXELS (Optional, not well tested)
EDIT HEADER so CCDPROC will work. hedit gsgt*[2],gsgt*[3] ccdsec delete+ FIX BAD PIXELS on each extension ccdproc gsgtS20050810S0062[2] out=f2gsgtS20050810S0062 fixpix+ fixfile=gsfixfile2 task $fix2=fix2.cl ccdproc gsgtS20050810S0062[3] out=f3gsgtS20050810S0062 fixpix+ fixfile=gsfixfile3 task $fix3=fix3.cl PASTE fixed extensions back into MEF imcopy f2gsgtS20050810S0062 gsgtS20050810S0062[2,overwrite] task $copy2=copy2.cl imcopy f3gsgtS20050810S0062 gsgtS20050810S0062[3,overwrite] task $copy3=copy3.cl FIX HEADERS hedit gsgt*[2],gsgt*[3] extname sci add+ hedit gsgt*[2] extver 2 add+ hedit gsgt*[3] extver 3 add+ hedit gsgt*[2],gsgt*[3] datasec [1:1024,1:2304] add+
- GSTRANSFORM - Wavelength Calibrate
- gstransform @objects_a.lis wavtran=gsgaN20040817S0016 - gstransform @objects_b.lis wavtran=gsgaN20040817S0017 - note: to use the same arc in other folders to wavelength calibrate, create a database/ folder in the new folder and copy over the id* and fc* files. => tgsgsgsgt cleanup: mv gsgsgsgt* proc_images/ - GSSKYSUBTRACT
- gsskysub @objects.lis long_sample = "100:200,300:400" fl_inter+ - enter a column to see interactive fit. - use s to define new sample (just like in background fitting in apall) => stgsgsgsgt cleanup: mv tgsgsgsgt* proc_images/ - GEMCOMBINE (OPTIONAL)
Note: Can combine 2-D spectra here if trace is difficult to follow when extracting. - gemcombine @objects_a.lis object_a_sum offsets=offset_file_a - gemcombine @objects_b.lis object_b_sum offsets=offset_file_b => object_a_sum, object_b_sum cleanup: mv stgsgsgsgt* proc_images/
- GSEXTRACT gemini_gsextract.txt.
- gsextract stgsgtN20040911S0116, fl_inte+ => estgsgsgsgt cleanup: mv stgsgsgsgt* proc_images/
- GSSTANDARD flux standard to determine flux calibration
- gsstandard estgsgsgsgtS20070914S0117.fits sfunction=sens starname=eg21 graphs=srei => sens.fits cleanup: mv estgsgsgsgtS20070914S0117.fits procimages/ - GSCALIBRATE to flux calibrate. gscalibrate.txt
- gscalibrate estgsgsgst* sens.fits => cestgsgsgsgt cleanup: mv estgsgsgsgt* proc_images/
- Delete header information before extracting 1-D spectra
- The wavelength calibration header keywords are in the SCI extension, but the pre-existing 2-D ones remain in the the PHU extension. For splot to find the correct information ALL wavelength info must be removed from the PHU. hedit filename[0] CRPIX*,CRVAL*,CD* delete+ verify- - Separate 1D spectra from MEF file
- imcopy @eobjects.lis @oeobjects.lis objects.lis: cestgsgsgsgtobject.fits[2,inherit] oobjects.lis: ocestgsgsgsgtobject.fits Note: using the [2,inherit] preserves the SCI header info, otherwise it will be lost. => ocestgsgsgsgt* cleanup: mv c* proc_images/ - SCOMBINE scombine.txt.
- scombine @object.lis object.fits => object.fits cleanup: mv o* proc_images/ - Telluric Correct telluric.txt.
- cp telluric.fits telluric_fixed.fits - splot and remove the telluric features and save: - sarith telluric.fits / telluric_fixed.fits telluric_mult.fits - splot telluric_mult.fits => make sure the features are predominantly above one (edit if necessary). - sarith object.fits * telluric_mult.fits object_tellcor.fits => object_tellcor.fits cleanup: everything else
- Make lists of observations according to central wavelength