;; Data reduction on Eric, a SWW offset position ;; looking to see why data appears bad in a few channels sum2=fltarr(9,128,128) inp='/scrs1/mickey/ut062902/19132/19132n5sww' darkinp='/scrs1/mickey/ut062902/dark/dark15' cal,inp,darkinp,1089,1112,1001,1005,sum,dark imdisp,sum,axis=1 sky,sum,4,[25,25,75,75],[25,75,75,25],20,20 print,max(sum) cal,inp,darkinp,1089,1092,1001,1005,sumn,dark imdisp,sumn,axis=1 print,max(sumn) sky,sumn,4,[25,25,75,75],[25,75,75,25],20,20 sum2(0,*,*)=sumn cal,inp,darkinp,1093,1096,1001,1005,sumn,dark imdisp,sumn,axis=1 print,max(sumn) sky,sumn,4,[25,25,75,75],[25,75,75,25],20,20 sum2(1,*,*)=sumn cal,inp,darkinp,1097,1100,1001,1005,sumn,dark imdisp,sumn,axis=1 print,max(sumn) sky,sumn,4,[25,25,75,75],[25,75,75,25],20,20 sum2(2,*,*)=sumn cal,inp,darkinp,1101,1104,1001,1005,sumn,dark imdisp,sumn,axis=1 print,max(sumn) sky,sumn,4,[25,25,75,75],[25,75,75,25],20,20 sum2(3,*,*)=sumn cal,inp,darkinp,1105,1108,1001,1005,sumn,dark imdisp,sumn,axis=1 print,max(sumn) sky,sumn,4,[25,25,75,75],[25,75,75,25],20,20 sum2(4,*,*)=sumn ;read,ans,prompt='Continue? (y/n)' ;if ans eq 'n' then return cal,inp,darkinp,1109,1112,1001,1005,sumn,dark imdisp,sumn,axis=1 print,max(sumn) sky,sumn,4,[25,25,75,75],[25,75,75,25],20,20 sum2(5,*,*)=sumn ss=size(sum2) sum_new=fltarr(128,128) for i=0,4 do begin &$ sum_new(*,*)=sum2(i,*,*)+sum_new(*,*) &$ endfor sum_new(*,*)=sum_new(*,*)-sum2(5,*,*) eric_sww=sum_new imdisp,eric_sww,axis=1 writefits,'eric_sww.fits',eric_sww,hdr ;Best solution is to exclude the last set of images from the analysis