## Quick and Not So Dirty Kast Reduction ## May 18, 2002 (De Vries, Whalen, Reuland and Dawson) 0. Rename the *.ccd files to *.fits rename *.ccd fits field=extn 1. Master bias R: Rbias.list B: Bbias.list cl> imstat @Rbias.list # IMAGE NPIX MEAN STDDEV MIN MAX r208 216000 6.682 46.38 -4. 1610. r210 216000 6.646 46.33 -4. 1611. cl> imcombine @Rbias.list Rbias.fits comb=average scale=none Output image = Rbias.fits, ncombine = 15 cl> imstat @Bbias.list # IMAGE NPIX MEAN STDDEV MIN MAX b207 216000 1.589 51.6 -13. 3098. b209 216000 1.529 51.54 -12. 2882. cl> imcombine @Bbias.list Bbias.fits comb=average scale=none 2. Subtract bias cl> imarith @rn1_all.list - Rbias @rn1_all.list//b cl> imarith @bn1_all.list - Bbias @bn1_all.list//b 3. Trim Images (last bias column, and stuff cl> imcopy @rn1_all.list//b[1:1190,10:169] @rn1_all.list//bt cl> imdel @rn1_al.l.list//b ver- cl> imcopy @bn1_all.list//b[1:1190,10:169] @bn1_all.list//bt cl> imdel @bn1_all.list//b ver- 4. Make flats Ideally, use flat taken immediately after science frames to correct for flexure and stuff. Median scaled as they have different exposure times cl> imcombine @Rdflat.list Rdflat comb=average scale=median reject=minmax nlow=3 nhigh=3 Output image = Rdflat, ncombine = 22 cl> imcombine @Bdflat.list Bdflat comb=average scale=median reject=minmax nlow=3 nhigh=3 Output image = Bdflat, ncombine = 15 Construct response function using flats response Rdflat Rdflat Rdflat_resp interac=yes response Bdflat Bdflat Bdflat_resp interac=yes imarith @rn1_all.list//bt / Rdflat_resp @rn1_all.list//btf 5. Szap without restoring background (ie cosmic ray zap & background subtraction in one go!) Set background parameters: cl> epar background axis=2 sample = "5:45,100:108,125:158" function=chebyshev order = 5 cl> szap r163btf r163btfzs inter=yes restore=no Interactive mode because of shifting spectra.... 6. Pairwise subtract cl> imarith r161btfzs - r163btfzs r161m163btfzs 7. Apall using b, w, a, s, z cl> apall r161m163btfzs 8. Rolling!! splot r161m163btfzs.ms