Reducing ESI Echelle Data 03jun00 UT ------------------------------------ *************** *** Caveats *** *************** 1) Rectifiy (after running twoamp) with esishift, transformation = "esi_rect.specs" (from Adelberger and pals). 2) Twoamp must be modified not to trim, as esishift expects the untrimmed image. Modified source code is (I think): procedure twoamp (images) # written by Andy Bunker # Jan 1998 - modified for trimmed output (DKS) # Oct 1998 - modified so colbias task automatically loaded (DKS) # - does chpixtype to real (DKS) string images {prompt="Image(s) for bias-subtracting"} int xbb_1 {2094,prompt="Blue side bias region start"} int xbb_2 {2166,prompt="Blue side bias region end"} int xb_1 {44,prompt="Blue side trim region start"} int xb_2 {1066,prompt="Blue side trim region end"} real bgain {1.97, prompt="Blue side gain, e-/DN"} int y_1 {3,prompt="Lower y of CCD"} int y_2 {2046,prompt="Upper y of CCD"} int xrb_1 {2174,prompt="Red side bias region start"} int xrb_2 {2244,prompt="Red side bias region end"} int xr_1 {1067,prompt="Red side trim region start"} int xr_2 {2089,prompt="Red side trim region end"} real rgain {2.10, prompt="Red side gain, e-/DN"} string cb {'cb', prompt="Suffix for bias-subd, gain-corrd images"} struct *imglist begin string imgfile struct img # Load colbias. if (!defpac("noao")) noao if (!defpac("imred")) imred if (!defpac("bias")) bias # need colbias task # Set some files. imgfile = mktemp("tmp$ctr") sections (images, option="fullname", >imgfile) imglist = imgfile # Loop through files. while (fscan(imglist,img) != EOF) { # change pixel type to real chpixtype (img, img, 'real') colbias (img, img//'cbb', bias='['//xbb_1//':'//xbb_2//',*]', trim='['//xb_1//':'//xb_2//','//y_1//':'//y_2//']') imarith (img//'cbb', '*', bgain, img//'cbb') colbias (img, img//'cbr', bias='['//xrb_1//':'//xrb_2//',*]', trim='['//xr_1//':'//xr_2//','//y_1//':'//y_2//']') imarith (img//'cbr', '*', rgain, img//'cbr') imcopy (img, img//cb) imcopy (img//'cbb', img//cb//'['//xb_1//':'//xb_2//','//y_1//':'//y_2//']') imcopy (img//'cbr', img//cb//'['//xr_1//':'//xr_2//','//y_1//':'//y_2//']') imdel (img//'cbb', go_ahead-, verify-) imdel (img//'cbr', go_ahead-, verify-) } end **************** *** Reducing *** **************** 1. Bias subtract with modified twoamp. list.bias = esi0051.fits setup star spectrum esi0052.fits seryprime spect. esi0053.fits seryprime spect. esi0054.fits seryprime spect. esi0055.fits seryprime spect. images = @list.bias Image(s) for bias-subtracting (xbb_1 = 2084) Blue side bias region start (xbb_2 = 2148) Blue side bias region end (xb_1 = 1) Blue side trim region start (xb_2 = 1048) Blue side trim region end (bgain = 1.) Blue side gain, e-/DN (y_1 = 1) Lower y of CCD (y_2 = 4096) Upper y of CCD (xrb_1 = 2156) Red side bias region start (xrb_2 = 2225) Red side bias region end (xr_1 = 1049) Red side trim region start (xr_2 = 2072) Red side trim region end (rgain = 1.) Red side gain, e-/DN (cb = cb) Suffix for bias-subd, gain-corrd images (imglist= tmp$ctr7744b) (mode = ql) 2. Rectify with esishift. e.g. esishift esi_rect.specs esi0051cb.fits esi0051cbr.fits 3. Rotate by 90 degrees, run bogus. * Useful webpage: http://www.keck.hawaii.edu:8080/realpublic/inst/esi/waveFinder.html