# reduction notes for 2009Sep04 wiro longslit # read in all images to rfits files a*.fit > allfiles.txt # replace .fit with .fits in output file list sed -e "s/.fit/.fits/" allfiles.txt > allout.txt rfits @allfiles.txt 0 @allout.txt # overscan and trim all images bt.fits #produce output file name with _bt suffix sed -e "s/.fits/_bt.fits/" allout.txt > trimout.txt imdel @trimout.txt ver- ccdproc @allout.txt outp=@trimout.txt biassec=[10:50,*] trimsec=[56:2099,741:1020] interact+ # make master bias image and # optionally reomve bias by subtracting master bias from all images here # produce a list of science images in science.txt and list of flat images in flats.txt # this unix head and tail comands only works if your flats are nicely seggregated from the # rest of the images !tail -n 71 trimout.txt > science.txt !head -n 14 trimout.txt | tail -n 5 > flats.txt # combine flats imdel masterflat.fits ver- imcomb @flats.txt outp=masterflat.fits comb=average rejec=avsigclip weight=median scale=mode statsec=[400:600,50:200] # run resp[onse on masteflat #imdel Response.fits ver+ response calib=masterflat.fits normal=masterflat.fits respons=Response.fits interac+ func=leg order=15 # or copy flat Response.fits from xxxx to use here #cp ../2009Sep03/Response.fits . # optionally create a master sky flat and use Illum to make # an illumination image. # divide science images by normalized master flat (i.e., response image) sed -e "s/_bt/_btf/" science.txt > science_f.txt imarith @science.txt / Response.fits @science_f.txt # if you made an Illum flat, divide by this image now too. # and dispaxis and extract spectra for each star hedit @science_f.txt field=DISPAXIS value=1 add+ verif- show+ update+ emacs stars.txt & ; list of stars for which to extract spectra emacs stars_ex.txt & ; MT names of stars emacs arcs.txt & ; arc files for each star imdel @stars_ex.txt verify- apall @stars.txt outp=@stars_ex.txt referen="" interac+ find+ recent+ resize+ trace+ fittr+ backgr=fit b_sampl='-30:-20,20:30' b_order=3 t_order=3 # extract arc spectral for each star using same apertures apall @arcs.txt outp=@arcs.txt referen=@stars.txt interac- edit- find- recent- resize- trace- fittr+ backgr=none # identify lines in first arc identify a016_btf.0001.fits sed -e "s/.fits/.0001.fits/" arcs.txt > arcs_ex.txt reidentify a016_btf.0001.fits @arcs_ex.txt coord=linelists$cuar.dat interac+ #rms=0.021 typically # # assign reference spectra cp arcs_ex.txt arcs_ex2.txt ; edit if necessary to assign spectra #emacs arcs_ex2.txt & sed -e "s/.fits/.0001.fits/" stars_ex.txt > stars_ex2.txt refspectra @stars_ex2.txt refer=@arcs_ex2.txt select=match verb+ # clean spectra with splot before transforming # apply wavelenth solutions sed -e "s/.0001/_w.0001/" stars_ex2.txt > stars_disp.txt imdel @stars_disp.txt ver- dispcor @stars_ex2.txt @stars_disp.txt verbos+ linear+ ls *_w*.fits | grep -v 0001 > contin.txt sed -e "s/_w/_wc/" contin.txt > contin_out.txt # continuum normalize del @contin_out.txt ver- continuum @contin.txt @contin_out.txt type=ratio replace- interac+ order=15 func=cheb high_re=2.2 low_rej=2