GMOS Reductions
Note: much of this is extracted from The Cookbook.
For this experiment I decided to use the GMOS routines all the way to extractions. One could bail earlier and do the flat-fielding in IRAF.
- Step one: install the special-doesn't-work-with-normal-IRAF-gemini software:
- Go to https://www.anaconda.com/download/#macos and download the installer for Python 3. Run the installer.
- Open a terminal window and do a "bash -l".
- which conda should return something
- conda config --add channels http://ssb.stsci.edu/astroconda
- conda create -n iraf27c python=2.7 iraf-all pyraf-all stsci gemini
- cd
- mkdir iraf27c
- conda activate iraf27c
- cd iraf27c
- mkiraf
- cl should invoke iraf; pyraf should invoke PyRAF, and python starts singing I'm a Lumberjack. For mysterious reasons "pyraf" actually dies a horrible death on my desktop, but works just fine on my laptop.
- You might want to add on the CR rejection softare; see The Manual.
- Note: in principle you can do a "conda init tcsh" and never have to mention bash again, but iraf itself won't work because it fails to invoke the external packages. Just use bash, okay?
- Subsequent times:
- Starting up IRAF
- Open an xgterm window
- bash -l
- conda activate geminiconda
- which cl
- cd wherever you created the login.cl and uparm
- cl
- gemini, gmos
- When done, conda deactivate
- Reducing long-slit data: Redux
- Download the data. Put all of the cals and science in a directory called "raw"
- Make an observing log. The difficulty is that some header words are in [0] and others are in [1]. This gets around this. Here's a handy script:
makelogs.cl. It creates obsLog.txt and (unlike the manual) retains the keywords.
I found it handy to then write down in a notebook what the pertinent frames were.
- Make lists
- (make sure you loaded gemini and gmos)
- Edit script biasSelect.cl. clEdit script compSelect.cl. Creates flat_F538.txt, arc_F538.txt, etc.
- Not really useful select out science frames since you need to treat them night/wavelength.
- Make master bias frame: gbias @bias.txt Zero
- Wavelength calibrate the arcs:
- unlearn gsreduce
- gsreduce @arc_538.txt fl_flat- bias=Zero
- gsreduce @arc_543.txt fl_flat- bias=Zero
- unlearn gswavelength
- gswavelength gs//@arc_538.txt fl_addf-
- gswavelength gs//@arc_543.txt fl_addf-
- create normalized flatfields corrected for detector gains:
- unlearn gsflat. Set fl_over- and edit in bias=Zero
- list="flat_538.txt"
- while(fscan(list,s1)!=EOF){
- gsflat(s1,'F'//s1)
- }
- Then rerun the script with list="flat_543"
- reduce, combine, transform, and extract the science frames by groups,
where one group is a grating tilt/night. One of the unusual things about GMOS data is a 20 minute exposure is just DOMINATED by cosmic rays; you have to get rid of these before you can even find the aperture to do extract something faint.
- Reduce:
- unlearn gsreduce
- Edit gsreduce and put fl_over- and bias=Zero
- gsreduce N20181209S0065 flat=FN20181209S0063
- gsreduce N20181209S0066 flat=FN20181209S0063
- gsreduce N20181209S0067 flat=FN20181209S0063
- gsreduce N20181209S0068 flat=FN20181209S0063
- combine. This is highly effective at getting rid of cosmic rays, but
this method assumes that there are 3 or more images that were taken consecutively under similar conditions that wave the same transform. Given Gemini, this only happens occasionally.
- transform:
- unlearn gstransform
- gstransform("Slit1_538",wavtraname="gsN20181209S0064"). This straightens the
night sky line but more importantly it adds in the wavelength solution.
- Extract:
- apsum tSlit1_538[sci] find- trace+ back=fit weight=variance clean+ gain=4 rad=0. (The data have been converted to electrons by gsreduce, but then you combined them by averaging. The readnoise went away but the gain is now N, the number of images you used.) The one you want is probably at 1044-ish.
- Now do the same for the others and then combine: scombine tSlit1_538.ms.fits[sci],tSlit1_543.ms.fits[sci] Slit1.ms.fits. DO remember to use the .ms. version (output from apsum).