PRO OTROK,inout,inlf,result,lim ;Evaluation of results of OTRACK (input arrays INOUT, INLF). ;Input parameter (optional) LIM - minimum accepted lifetime ;(in units of time-difference between frames). Default=2. ;Output: array RESULT. Each row corresponds to one UD. ; 0 - lifetime in minutes ; 1 - average position x (pixel coords) ; 2 - average position y ; 3 - average velocity in x (km/s) ; 4 - average velocity in y (km/s) ; 5 - average velocity modulus (km/s) ; 6 - average peak intensity (units of Iph) ; 7 - stdev of intensity ; 8 - average effective diameter (") ; 9 - stdev of effective diameter ;************** PARAMETERS **************************** dtim=44.5265 ;time difference between frames (s) scal=0.125 ;scale arcsec/pix sx =70 ;x-size of frames processed by OTRACK ;****************************************************** vscal=scal*725./dtim ;velocity scale (km/s) if n_params() lt 4 then lim=2 ;default for lim print,'Minimum accepted lifetime:',lim ;Eliminate UDs with lifetime below the limit w=where(inlf(0,*) ge lim,n) out=inout(*,*,w) result=fltarr(10,n) ;Loop over dots for i=0,n-1 do begin w=where(inout(0,*,i),m) ;subscripts of existing data, ;m-1 is the lifetime ;Lifetime result(0,i)=(m-1)*dtim/60. ;Average position pos=out(1,w,i) ;1-D coordinate x=pos mod sx ;2-D coords y=pos/sx result(1,i)=round(total(x)/m) result(2,i)=round(total(y)/m) ;Average velocity dx=x(m-1)-x(0) ;total displacement dy=y(m-1)-y(0) result(3,i)=vscal*dx/(m-1) ;x-component result(4,i)=vscal*dy/(m-1) ;y-component result(5,i)=sqrt(result(3,i)^2+result(4,i)^2) ;modulus ;Peak intensity, mean, stdev result(7,i)=stdev(out(0,w,i)/10000.,mea) result(6,i)=mea ;Effective diameter, mean, stdev diam=scal*sqrt(4*out(2,w,i)/!pi) result(9,i)=stdev(diam,mea) result(8,i)=mea endfor print,n,' umbral dots' end