; ; Routine to create an average dark image for ; SwRI images ; filenm=' ' listfile='./dfedarklist' pixX = 256 pixY = 1024 bias = fltarr(pixX) img=intarr(pixX,pixY) fimg=fltarr(pixX,pixY) favg=fltarr(pixX,pixY) close,13 & openr,13,listfile ii=0 loadct,1 close,13 & openr,13,listfile ii=0 while ( not eof(13) ) do begin & readf,13,filenm & ii=ii+1 & endwhile close,13 numimgs=ii print,ii," images" close,13 & openr,13,listfile ii=0 while ( not eof(13) ) do begin ;{ readf,13,filenm print,filenm close,1 & openr,1,filenm img=intarr(pixX,pixY) readu,1,img byteorder,img tv,img*2 fimg = 1.*img ; Remove electronic intensity to bias on a column basis for jj=0,pixX-1 do bias(jj)=fimg(jj,0) for jj=0,pixY-1 do fimg(*,jj)=fimg(*,jj)-bias favg = favg+1.*img ii=ii+1 endwhile ;} close,13 fimg = favg/float(numimgs) close,1 & openw,1,'meandark' writeu,1,fimg close,1 stop end