head = bytarr(2880) xsz = 2034 & ysz = 2034 ovxsz = 1. / float(xsz) row_avg = fltarr(ysz) row_img = fltarr(xsz,ysz) p1=intarr(xsz,ysz) p2=intarr(xsz,ysz) p3=intarr(xsz,ysz) p4=intarr(xsz,ysz) filep1='../980226_181138_eclp.fts' filep2='../980226_181151_eclp.fts' filep3='../980226_181204_eclp.fts' filep4='../980226_181216_eclp.fts' outfile = 'medium' close,1 & openr,1,filep1 & readu,1,head & readu,1,p1 & close,1 close,1 & openr,1,filep2 & readu,1,head & readu,1,p2 & close,1 close,1 & openr,1,filep3 & readu,1,head & readu,1,p3 & close,1 close,1 & openr,1,filep4 & readu,1,head & readu,1,p4 & close,1 byteorder,p1 byteorder,p2 byteorder,p3 byteorder,p4 imgL = float(p1) imgL = (imgL lt 0.) * ( imgL + 2.*32768. ) + (imgL ge 0.)*(imgL) for jj=0,ysz-2 do begin row_avg(jj)=total(imgL(*,jj )) * ovxsz row_img(*,jj)=row_avg(jj) endfor ;; Use a column --> column (y-row) at x=4 bias_line = imgL(4,0+100:2033-100) bias = total(bias_line) / (float(n_elements(bias_line))) imgL = imgL + row_img * 0.01 - bias p1 = imgL imgL = float(p2) imgL = (imgL lt 0.) * ( imgL + 2.*32768. ) + (imgL ge 0.)*(imgL) for jj=0,ysz-2 do begin row_avg(jj)=total(imgL(*,jj )) * ovxsz row_img(*,jj)=row_avg(jj) endfor bias_line = imgL(4,0+100:2033-100) bias = total(bias_line) / (float(n_elements(bias_line))) imgL = imgL + row_img * 0.01 - bias p2 = imgL imgL = float(p3) imgL = (imgL lt 0.) * ( imgL + 2.*32768. ) + (imgL ge 0.)*(imgL) for jj=0,ysz-2 do begin row_avg(jj)=total(imgL(*,jj )) * ovxsz row_img(*,jj)=row_avg(jj) endfor bias_line = imgL(4,0+100:2033-100) bias = total(bias_line) / (float(n_elements(bias_line))) imgL = imgL + row_img * 0.01 - bias p3 = imgL imgL = float(p4) imgL = (imgL lt 0.) * ( imgL + 2.*32768. ) + (imgL ge 0.)*(imgL) for jj=0,ysz-2 do begin row_avg(jj)=total(imgL(*,jj )) * ovxsz row_img(*,jj)=row_avg(jj) endfor bias_line = imgL(4,0+100:2033-100) bias = total(bias_line) / (float(n_elements(bias_line))) imgL = imgL + row_img * 0.01 - bias p4 = imgL p1 = p1 - p3 p2 = p2 - p4 small = p1*p1 + p2*p2 small = sqrt ( small ) close,1 & openw,1,outfile & writeu,1,small & close,1 tv,bytscl(small,min=0.,max=22000.) end