; reference-based alignment with the reference refinement ; number of particles x91=4532 ; number of reference images x92=1 ; last ring for rotational alignment x21=63 ; first ring for rotational alignment x22=5 ; Search range ; (the search for translation parameters will be ; restricted to +/- search range). x23=6 x24=1 ; number of iterations x25=6 ; original data ../winp047/ser***** ; aligned data data002@**** x90=1 ; copy original data to the stack do lb21 x31=1,x91 cp /net/ithaca/usr25/irene/winp047/ser{*****x31} data002@{****x31} lb21 ; create the selection document file. ; The image series is consecutive DOC CREATE select 1 1-x91 DOC CREATE selref 1 1-x92 ;Prepare the 1st file for combining shifts and rotation angles x99=0 do lb18 i=1,x91 sd x0,x99,x99,x99,x99 trns001 lb18 sd e trns001 ; iteration loop do lb5 x37=1,x25 x38=x37+1 ; create subdirectory for alignment results vm echo "if(-d refine{**x37}) rm -r refine{**x37}"|csh vm mkdir refine{**x37} ; get the resolution as r data002@**** x90-x91 O refine{**x37}/avgodd refine{**x37}/varodd refine{**x37}/avgeven refine{**x37}/vareven ; rf refine{**x37}/avgodd refine{**x37}/avgeven (0.5) (0.2,2) rff{***x37} ; get the refined reference as r data002@**** x90-x91 A refine{**x37}/ref001 refine{**x37}/var001 if(x37.eq.x25) goto lb5 ; do the alignment ap mq refine{**x37}/ref*** selref x23,x24 x22,x21 data002@**** select refine{**x37}/apmq001 lb77 ;rotate and shift images according to the parameters from AP MQ alignment @alqr refine{**x37}/apmq001 ../winp047/ser***** data002@**** trns{***x37} trns{***x38} lb5 en d