Step A: ccdprocing the data: 1. Fix headers for image types if needed: imred ccdred setinstrument specphot ccdlist *.fits You should see “comp”, “flat”, “zero”, and “object” types. If any of these are wrong, put a list of each thing into a file files *0036.fits,*0037.fits,*0038.fits > newzeros hedit @newzeros IMAGETYP ‘BIAS’ add+ ver- show+ Other keywords are “PROJECTOR FLAT” for flats, “COMPARISON” for comps, and “OBJECT” for objects. hselect *.fits gain yes [see if the gain is there] hselect *.fits rdnoise yes [see if the read-noise is there] If not, hedit *.fits gain XXX up+ ver- show+ [where XXX is the electrons per ADU] hedit *.fits rdnoise YYY up+ ver- show+ [where YYY is the readnoise in electrons per pixel] 2) Determine the trimsec and biassec from a flat: implot one of the flats: trimsec is going to be 26:1047, 20:80 biassec is going to be 1050:1095,20:80 E,E to expand area, A to get axes 20:80 - c for column and then flat line (C,C) 3) epar ccdred: backup = Raw/ mkdir Raw 4) Combine the biases: zerocombine *.fits 5) epar ccdproc: set biassec=[1050:1095,20:80] trimsec=[26:1047,20:80] zero=Zero 6) ccdproc to fit overscan, trim, and remove the bias frame 7) flatcombine *.fits to combine flats and make Flat 8) epar ccdproc and turn flatcor on and flat=Flat. Then ccdproc. Will process the comp(s) and objects. ************DONE WITH CCDPROC***********. From then on, when a new object spectrum comes in, you just have to do a ccdproc newspec.fits Next, set up doslit: imred kpnoslit epar kpnoslit and make sure that dispaxis is 1 for spectra that go from left to right. Set to 2 if the spectrum goes up and down. implot an object spectrum, and so a “c” to see how broad the profile is. Enter this number in doslit.width epar doslit: make sure dispcor is yes resize=yes clean=yes redo=no Under epar sparams defaults may be reasonable, but you may have to adjust the background region (b_sampl) after you look at a spectrum. Could be -20:-10,10:20 say rather than -10:-6,6:10 coordlist….if you’re using the HeNeAr, this should be fine. We’ll have to change it to deveny.dat for our comparison spectrum. Depending upon what information header you have, it may not be able to match your comparison spectrum to the observed spectrum because it may not be able to figure out the julian day. There are two fixes that might work: a) There might not be a problem. b) It might be cured by just setting the observatory correctly: hedit *.fits observat ‘apo’ add+ ver- show+ (might have to first delete it: hedit *.fits observat delete+ ver- show+) c If none of that works, just force the damn jd to 1.0: hedit *.fits jd 1 add+ ver- show+ Okay, now let’s try it: doslit spect.fits comp.fits First thing it will do is put you in the aperture definition. You shouldn’t see the spectrum. You should see the spatial cut perpendicular to the spectrum. Make sure the aperture looks reasonable and that the right peak is identified. If not, you can clear it and remark it by doing a “d” and then an “m” on the right peak. Second thing: go into the background by hitting a “b”. If you like it you can then just do a “q” to return to the aperture definition stage. If you want to change it, do a “t” to clear it, a pair of s’s on the left, a pair of s’s on the right, and a “f” to refit it. Then a q. Now go into the trace by doing a q. You can change the order and make new fit as usual by doing an “:order 5” and a “f”. When you’re happy do a q. Now you’re going to fit the comparison (first time through). a) Do a preliminary fit: -MARK three lines by putting the cursor on them and typing an “m”. Enter the approximate wavelenth. (DCT data: http://www2.lowell.edu/users/massey/SkyBrightHJ.html; HeNeAr: http://www.mmto.org/node/450, http://iraf.noao.edu/specatlas/henear/henear.html, http://www.mmto.org/~rcool/arc_plots/bluechan_1200gpm_blue_0.png) When you have 3 or 4 good lines marked (one on either end and in the middle), do a fit by typing “m”. You can see the fit better if you then do a “l”. If it looks “reasonable,” return to the id stage. b) You should be back looking at the comp lines. Identify the rest of them by doing an “l”. Hopefully it will then find the rest of the lines. If it didn’t, something was wrong with your initial fit. Try again by deleting the lines (an “a” for all and then a “d” to delete) and try again. If it does fit all the lines, then do an “f”. c) The final fit should be a spline3 or order 1, 2, or 3. Typing an “l” to see the non-linear portion of the fit should show a nice curve going through everything. The RMS up at the top should be about 0.007 [A] or less. d) q. It should now proceed to extract the spectrum and wavelength calibrate. Answer “no” to changing the dispersion solution. As you’re doing new spectra, check the rms under the fit and if they go wonky say yes when it offers to refit the line. This is all described in detail in the attached pdf…The first part goes through doing things step by step; doslit (section 4) combines all of the steps.