good = 0. good_aa = 0. good_bb = 0. opal5B=7.76e-7 opal5C=8.00e-8 ;; David (May 18,2000) thinks the 8.00e-8 is in error, and ;; should be replaced with 8.28e-8. ;; opal5C=8.28e-8 print,' ' print,' ' print,'opal5B=',opal5B,' opal5C=',opal5C print,' ' print,' ' dome = 1 if ( dome ) then begin ;{ window,xsize=339,ysize=678 window,2,xsize=600,ysize=400 endif ;} close,1 & close,13 pmn = 15000. & pmx = 30000. xmn = 0. & xmx = 339. lfilenm = 'cmplist' lfilenm = 'cmplist2' filenm=' ' close,13 & openr,13,lfilenm imgB=intarr(339,339) imgC=intarr(339,339) xsz=2034 & ysz=2034 & ovxsz = 1. / float(xsz) ybeg = 100 yend = 2033-100 ylen = 1+(yend-ybeg) ovy = 1. / float(ylen) row_avg = fltarr(ylen) row_avg(*) = 0. bias_img = fltarr(xsz,ysz) bias_img(*,*) = 0. mm=0 while ( not eof(13) ) do begin ;{ readf,13,filenm fts_img = readfits(filenm,hdr,silent=1) xsz = fix(sxpar (hdr , 'NAXIS1')) ysz = fix(sxpar (hdr , 'NAXIS2')) expt = float(sxpar (hdr , 'SHUTTER')) lcvrv = fix(sxpar (hdr , 'LCVR-V')) lcvrt = float(sxpar (hdr , 'LCVR-T')) byteorder,fts_img img = float(fts_img) img = (img lt 0 ) * ( img + 32768 + 32768) + (img ge 0)*(img) ;;; { bias_bb = -0.00951220 bias_bb = -0.00953071 ;; Use a column (y-row) at x=4 , avoiding edge effects, ;; to get the bias_line. bias_line = img(4,ybeg:yend) ;; The bias is then influenced by the avg total intensity of the ;; previous row. for jj=0,ylen-1 do begin;{ kk=jj+ybeg-1 row_avg(jj) = total(img(*,kk)) * ovxsz endfor ;} xx = row_avg yy = bias_line bias_aa = total ( yy - xx*bias_bb ) / (float(n_elements(bias_line))) bias_fit = xx*bias_bb + bias_aa for jj=0,xsz-1 do begin;{ bias_img(jj,ybeg:yend) = bias_fit endfor ;} bias_img(*,0:ybeg) = bias_fit(0) bias_img(*,yend:ysz-1) = bias_fit(ylen-1) ;;; } img = img - bias_img print,filenm,' Exposure ',expt opal = strmid(filenm,0,2) if ( opal eq '5B' ) then begin ;{ imgB = rebin(img, 339,339) ;;; imgB = img wset,0 & & erase & tv,bytscl(imgB,min=22000,max=24000) imgC (*,*) = 0. testB = imgB(50:250,339/2) endif ;} if ( opal eq '5C' ) then begin ;{ imgC = rebin(img, 339,339) ;;; imgC = img wset,0 & tv,bytscl(imgC,min=2200,max=2500),0, 339 leastsq,imgB,imgC, aa,bb,RR print,aa,bb,RR,' Leastsq ',opal5B*bb,' Opal5C ? ' testC = imgC(50:250,339/2) if(mm eq 1 ) then begin ;{ testC[102] = ( testC[101] + testC[103] ) *0.5 endif;} ;;; coeff = poly_fit(testB,testC,1,yfit,yband,sigma,corrm) ;;; print,coeff(0),coeff(1) , sigma ;;; testF = testB * coeff(1) + coeff(0) testF = testB * bb + aa wset,2 if(mm eq 0 ) then begin ;{ plot,[2.0e+3,2.5e+3],[2.0e+3,2.5e+3],/nodata,/ynoz endif ;} mys = 1+mm oplot,testF , testC , psym=mys mm=mm+1 if( RR > 0.90 ) then begin ;{ good = good + 1. good_aa = good_aa + aa good_bb = good_bb + bb endif ;} endif ;} ;wset,2 ;plot,[xmn,xmx],[pmn,pmx],/nodata,xstyle=1,ystyle=1 ;oplot,imgB(*,339/2), thick=2 ;;oplot,imgC(*,339/2) ;;; Ratio should be: ( 7.73e-7 / 8.25e-8 ) ;;oplot,imgC(*,339/2) ;;; Ratio should be: ( 7.76e-7 / 8.00e-8 ) @POISE w.l. ; oplot,imgC(*,339/2) * ( 7.76e-7 / 8.00e-8 ),linestyle=2,thick=2 endwhile ;} close,13 good_aa = good_aa / good good_bb = good_bb / good print,' ' print,'good_aa good_bb',good_aa,good_bb print,' ' print,' ' print , '5C = good_bb*5B = ',good_bb*opal5B ;;; = 7.78726e-08 print,' ' end