;Adapted from PFILT.BAT apply low pass filter to and shrinks a set of particle images ; ------------- Parameters ------------- ; NOTE: filter radii are in reciprocal pixels on the full-size image x11 = 7 ; filter type (7==Butterworth) x21 = 0.075 ; filter parameter 1 (pass-band if Butterworth, else filter radius) x22 = 0.10 ; filter parameter 2 ; stop band for Butterworth, temperature for Fermi, else not required x26 = 2 ; reduction/decimation factor (integer) x56 = 3 ; print progress message to screen every (x56)th micrograph ; --------------- Inputs --------------- fr l [neg_particle_table]../Particles/order fr l [unfiltered]ali/sar ; --------------- Output --------------- ; OUTPUT: fr l [filtered]../Particles/flt/flt ; ---------- END BATCH HEADER ---------- md set mp 0 ; get the filenumbers ud n,x19 [neg_particle_table] ; loop through micrographs DO LB2 x10=1,x19 ; get micrograph# (x55), first particle (x78), last particle (x79) ud ic,x10,x55,x76,x77,x78,x79 [neg_particle_table] ; print progress message if (int(x10/x56).eq.x10/x56) then vm echo "On micrograph #{***x55}, {***x10} out of {***x19}" endif ; loop through particles do lb1 x44=x78,x79 cp [unfiltered]{******x44} _5 ; if Butterworth filter IF (x11.eq.7) THEN FQ np _5 ; input file _4 ; output file x11 ; filter type x21,x22 ; passband, stopband endif ; if Fermi filter IF (x11.eq.5) THEN FQ np _5 ; input file _4 ; output file x11 ; filter type = Fermi x21 ; filter radius x22 ; temperature cutoff endif ; if Gaussian or top-hat filter IF (x11.le.3) THEN FQ np _5 ; input file _4 ; output file x11 ; filter type = top hat, Gaussian x21 ; filter radius ENDIF ; shrink dc s _4 [filtered]{******x44} x26,x26 ; reduction factor in x,y lb1 ; end particle loop LB2 ; end micrograph loop ud ice [neg_particle_table] vm echo "Done"; date EN D ; Modified 2004-12-28 ; 2004-11-30 (trs) -- Micrograph# is now the first column in order ; 2004-07-08 (trs) -- Assumes keys in order are consecutive (!=micrograph#) ; 2004-06-16 (trs) -- dusts images