; CALCULATE STATISTICS FOR A SERIES OF IMAGES ; ; GLOBAL MIN, MAX WILL BE AT THE END OF OUTPUT FILE AND/OR RESULTS ; PARAMETER: x56 = 3000 ; print progress message to screen every (x56)th particle ; INPUTS: FR G [particle_list]../Verify/global_select/sel001 ; particle-selection doc FR G [images]../Particles/flt/flt ; particles ; OUTPUT: FR G [stats_doc]docimgmin ; END BATCH HEADER ; initialize min (x80), max (x79) x80=9999 x79=-9999 ; get number of particles ud n,x50 [particle_list] ; loop through particles do lb5 x51=1,x50 if (int(x51/x56).eq.x51/x56) then vm echo "Working on {******x51}th particle out of {******x50}" endif ; get particle number (x52) ud ic,x51,x52 [particle_list] ; get max (x77), min (x88) fs [images]{******x52} fi x77,x88 [images]{******x52} (7,8) ; header location for min, max ; write to document: particle# (x52), min (x77), max (x88) sd x51,x52,x77,x88 [stats_doc] ; update min (x80), max (x79) if necessary if(x88.lt.x80)x80=x88 if(x77.gt.x79)x79=x77 lb5 ; end particle loop ud ice [particle_list] ; write global min (x80), global max (x79) x80 ; min x79 ; max sd -1,x80,x79 [stats_doc] en