; ; Routine to create an average opal image for ; SwRI images ; filenm=' ' listfile='~/donlist_opal' pixX = 256 pixY = 1024 bias = fltarr(pixX) img=intarr(pixX,pixY) fimg=fltarr(pixX,pixY) close,13 & openr,13,listfile ii=0 loadct,1 filenm=' ' listfile='~/donlist_opal' 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 for jj=0,pixX-1 do bias(jj)=img(jj,0)+img(jj,1) bias = bias/2. for jj=0,pixY-1 do img(*,jj)=img(*,jj)-bias tv,img/16 fimg = fimg+1.*img ii=ii+1 endwhile ;} close,13 fimg = fimg/float(numimgs) close,1 & openw,1,'meanopal' writeu,1,fimg close,1 stop end