Loading...
 

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 guide was 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. (HOW?)

Get all data prepared and organized

  • Download data, sort it by type, gprepare it and move to working directory. see Gemini Getfiles.
  • GPREPARE the data
grepare @objects.lis rawpath=/datapath/rawdata outpref=/filepath/workingdirectory/gt fl_addm+ fl_vardq-
  • Reduce flux standard(s) (typically taken in traditional mode, not NS mode)
see GMOS Standard.
=> sens.fits

Make darks, flats, and arcs

  • Make dark for nod and shuffle observations (use gbias and overscan subtract)
gbias @darks.lis dark.fits fl_over+ fl_trim+
=> dark.fits
cleanup: mv gd* procimages/
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+
- Make sure you fit the overscan regions interactively to fit the middle region.
(Use s, s, f to change the region)
- When prompted: fitline = 1000-1300
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/
gsreduce @arcs.lis fl_trim+ fl_bias+ fl_gmosaic+ fl_gsappwave+ fl_cut+ bias=gS20070913S0213_bias.fits
gswavelength gsgaS20070913S0152.fits
gswavelength gsgaS20070913S0153.fits
- Note: there are two different kinds of arcs, ones for N&S, and standard arcs. Check the MASKNAME in the PHU to check which type it is and be sure to use the correct type with the data.
=> 2 gsga (with two central wavelengths)
cleanup: mv ga* proc_images/

Reduce targets

  • GSREDUCE - dark subtract, overscan subtract, and trim objects ONLY
- bias = dark
gsreduce @objects.lis fl_over+ fl_trim+ fl_bias+ bias=dark ovs_fli+
=> gsgt
cleanup: mv gt* procimages/
  • 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+

  • GNSSKYSUB targets — gets everything in the middle 1/3rd
gnsskysub gsgt* %%% => ngsgt* %%% cleanup: mv gsgt* procimages/
  • GEMARITH to invert
gemarith ngsgN20040919S0018 * -1 ngsgtN20040919S0018i
gemarith ngsgN20040919S0021 * -1 ngsgtN20040919S0021i
=> ngsgt*, ngsgt*i
  • Make lists of A and B observations by night
hselect > objects_1006_a.lis
     images  = ngsgt*.fits[0]
     select = $I
     expr = obstype ?= 'OBJECT' && grwlen == 810
hselect > objects_1006_b.lis+-
     images  = ngsgt*.fits[0]
     select = $I
     expr    = obstype ?= 'OBJECT' && grwlen == 815
  • GSREDUCE - flat, mosaic, interpolate over chip gaps, and cut.
gsreduce @objects_1006_a.lis fl_flat+ fl_gmos+ fl_fixp+ fl_gsap+ fl_cut+ flat=flat_1006a
gsreduce @objects_1006_b.lis fl_flat+ fl_gmos+ fl_fixp+ fl_gsap+ fl_cut+ flat=flat_1006b
=> gsngsgt
cleanup: mv ngsgt* procimages/
  • GSTRANSFORM - Wavelength Calibrate
gstransform @objects_a.lis wavtran=gsgaN20040817S0016
gstransform @objects_b.lis wavtran=gsgaN20040817S0017
=> tgsngsgt
cleanup: mv gsngsgt* procimages/
  • GEMCOMBINE objects with same wavelength (optional): see GEMCOMBINE
scale=none weights=none reject=none
gemcombine tgsngsgt51,tgsngsgt51i ctgsngsgt51 offset=offset_file
=> ctgsngsgt*
cleanup: mv tgsngsgt* procimages/
gsextract stgsgtN20040911S0116, fl_inte+
=> ectgsngsgt*
cleanup: mv ctgsngsgt* procimages/
  • delete 2D wavelength keywords and OBJECT=2:
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 ect*[0] CRPIX*,CRVAL*,CD* delete+ verify-
hedit ect*[SCI] object delete+ verify-
  • extract spectra from MEF file
imcopy @objects.lis @oobjects.lis
objects.lis: ectgsngsgN20040911S0116.fits[2,inherit]
oobjects.lis: oectgsngsgN20040911S0116.fits

Note: using the [2,inherit] preserves the SCI header info, otherwise it will be lost.
  • splot
  • SCOMBINE (or scopy to just change wavelength scale) if you didn't combine with gemcombine
just pure sum and modify header
scombine oc,oc object w1=6100 w2=10250 comine=sum scale=none weight=none
  • CALIBRATE - flux calibrate.
calibrate @uncal.lis @cal.lis sens=sens
=> output images
cleanup: mv oectgsngsgt* procimages/
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
  • splot oc*


Page last modified on Friday 22 of January, 2010 20:05:33 EST