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' filenm=' ' close,13 & openr,13,lfilenm imgB=intarr(339,339) imgC=intarr(339,339) xsz=2034 & ysz=2034 row_avg = fltarr(ysz) row_img = fltarr(xsz,ysz) ovxsz = 1. / float(xsz) kk=0 while ( not eof(13) ) do begin ;{ readf,13,filenm 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,img img = long(img) img = (img lt 0 ) * ( img + 32768 + 32768) + (img ge 0)*(img) ;; Compute CCD offset. ;; ;; There is an offset in the CCD that is approximately the ;; average of the row's intensity / 100. This needs to be ;; removed after the bias removal. ;; David computed the average based on the "jj+1" row, ;; not the jj'th row -- an error?? for jj=0,ysz-2 do begin ;; row_avg(jj)=total(img(*,jj+1)) * ovxsz ;; David's way row_avg(jj)=total(img(*,jj )) * ovxsz ;; Alice's way row_img(*,jj)=row_avg(jj) endfor ;; Use a column --> column (y-row) at x=4 bias_line = img(4,0+100:2033-100) bias = total(bias_line) / (float(n_elements(bias_line))) img = img - bias img = img + row_img * 0.01 cavg = total ( img (100:2033-100 , 1017 ) ) / (2034. - 200. ) print,filenm,' Exposure ',expt, bias , cavg opal = strmid(filenm,0,2) if ( opal eq '5B' ) then begin ;{ imgB = rebin(img, 339,339) 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) 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) * ( opal5B / opal5C ) if(kk 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) wset,2 if(kk eq 0 ) then begin ;{ plot,[2.18e+4,2.36e+4],[2.18e+4,2.36e+4],/nodata,/ynoz endif ;} mys = 1+kk oplot,testF , testC , psym=mys kk=kk+1 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 end