; Apply rerence-free alignment to the particles series ; Number of particles X91=3744 ; Expected size of the particle x20=60 ; Max radius for rotational alignment x21=25 ; Prepare selection document file with particle numbers for AP SR DOC CREATE select 1 1-X91 ap sr center/PRK**** select x20 5,x21 oua*** prm*** ; Find out how many prm files were made and pick the last one. DO LB12 I=1,9999 X71=X0 IQ FI,X11 prm{***X71} IF(X11.EQ.0.0) THEN X71=X71-1 GOTO LB13 ENDIF LB12 LB13 ; Align all the particles according to the parameters from the ; document file produced by AP SR do lb1 x90=1,X91 ud ic,x90,x41,x42,x43 prm{***X71} rt sq center/PRK{****x90} aprc/PRK{****x90} x41 X42,X43 lb1 ; ; Prepare mask for PCA ; Get image dimensions FI X41,X42 aprc/PRK0001 12,2 ; Set mask radius to NSAM/2-1 X43=INT(X41/2)-1 mo _1 X41,X42 C X43 ; Prepare SEQuential file ; Code number X95=5 CA SI aprc/PRK**** 1-X91 _1 SEQ{***X95} Y 0.0 ; Perform PCA, get 20 factors CA S SEQ{***X95} 20,X95 Y 0 ; Do the Hierarchical Clustering CL HC 2 X95 1-20 0 2 N Y den001 ; Calculate number of classes for a given threshold CL HD 0.7 den001 how_many ; Create selection docfiles for a given threshold CL HE 0.7 den001 grp/sel*** ; Calculate group averages UD N,X81 how_many DO LB81 X31=1,X81 AS R aprc/PRK**** grp/sel{***X31} A grp/avg{***X31} grp/var{***X31} LB81 ; Calculate the resolution for each group DO LB82 X31=1,X81 AS R aprc/PRK**** grp/sel{***X31} O _1 _2 _3 _4 RF _1 _3 (0.5) (0.2,2.0) grp/dres{***X31} LB82 EN