AP RD - Alignment - multireference, restricted projections ||

(1/28/04)

PURPOSE

Compares a set of experimental images with a set of reference images. For each experimental image it finds the in-plane Euler rotation angle which aligns the image with the most similar reference image. An experimental image is only compared with reference images within a restricted angular range.. Mirrored positions are checked. The only difference between this operation and 'AP RN' is how they handle mirroring.
(See align_overview.html for comparison of 'AP' operations.)
OBSOLETE! USE 'AP REF' INSTEAD!

SEE ALSO

AP SA [Alignment - reference free, Shift ||]
AP SR [Alignment - reference free, Shift & Rotation ||]
AP REF [Alignment - multi-reference, rotation & shift ||*]

USAGE

.OPERATION: AP RD

.TEMPLATE FOR REFERENCE IMAGE SERIES: REF***
[Give the template name of the existing file series of 2D reference images (typically projections).]

.FILE NUMBERS OR SELECTION DOC. FILE NAME: SELECTREF
[Enter numbers of reference files. The file numbers can also be read from a selection document file where file numbers are contained in the first register (not the keys).]

.FIRST, LAST RING & SKIP: 5,15,1
[Only rings with radii in the range 5-15 will be analyzed. If skip=0 or 1, then every ring between 5 and 15 will be taken; for skip=2, every second ring; etc.]

.REFERENCE IMAGES ANGLES DOCUMENT FILE: Refangles
[Enter the name of the angular document file containing Eulerian angles of reference images (projections): psi, theta, phi.]

.REFERENCE-RINGS FILE: REF001
[Give name of reference-rings file. If the file exists, SPIDER will read the reference-rings data from this file and will not read the reference image file series. If this file does not exist, SPIDER will create/store the reference-rings data in incore memory. If SPIDER is unable to allocate sufficient memory for the reference-rings data then the reference-rings file must exist. In that case, use operation 'AP I' to create the reference-rings file. More than one SPIDER run can use the same reference-rings file.
Note that old responses 'W', 'Y', & 'N' are now obsolete.

.TEMPLATE FOR IMAGE SERIES TO BE ALIGNED: DAT***
[Give the template name of the existing file series of experimental images. These images will be checked for alignment versus the reference images.]

.FILE NUMBERS OR SELECTION DOC. FILE NAME:1-21
[Enter numbers of experimental files. The file numbers can also be read from a selection document file where file numbers are contained in the first register (not the keys).]

.EXPERIMENTAL IMAGES ANGLES DOCUMENT FILE: angles001
[Enter the name of the angular document file containing Eulerian angles of experimental images (projections: psi, theta, phi. Experimental images will be compared with only these reference images whose normal is within a specified range from this angular value.]

.RANGE OF ANGULAR SEARCH: 20.0
[Experimental images will be compared with only these reference images whose normal is within 20 degrees range.]

.OUTPUT ANGLES DOCUMENT FILE: APMD101
[This is the only output produced by this program. It contains 7 register columns:

1.Number of the most similar reference image.
When this number is negative, the most similar is the mirrored projection (see note 1). When no matching projection was found within the angular range specified, this column will contain 0.

2.Not-normalized correlation coefficient.
Can be used as a similarity measure.

3. "-psi" angle.
In-plane rotation angle determined. To use in 3D reconstruction programs invert the sign.

4. Always 0.0

5. Always 0.0

6. Experimental projection number.

7. Angular change for projection.]

NOTES

  1. In 3D space the projection with the direction: (psi, theta, phi) has its mirrored (around X-axis) counterpart in the direction:
    (-psi, 180-theta, phi+180).
    To save time, the program takes this into account, and each data projection is compared with the reference projection and its mirrored version at the same time. Thus, only half of the total number of reference projections are required; namely, only those with 0<theta<90. If the best match was with the mirrored reference projection, then the number stored in the first column of the document file is negative (see included batch program).

  2. The reference projections (of the existing structure) can be created using 'VO EA' and 'PJ 3Q' commands. 'VO EA' creates an angular document file with quasi-evenly spaced projection directions and 'PJ 3Q' creates projections of the volume according to this doc file.

  3. The output document file created by 'AP MD' can be converted to the angular document file using 'VO MD' command. Please note that in this case the angular document file created by VO EA is required.

  4. The operation switches automatically between in-core and on-disk versions depending on the memory available. The reference rings file can be used in either case.

  5. Columns number 4 and 5 in the output document files are always filled with zeros and correspond to zero translation. This is done to keep the the document file format the same as in AP MD command.

  6. The operation is computationally intensive. The code is parallel.

  7. An example of the SPIDER batch program which can be used to produce an angular document file from the output document file of this command is included in the manual chapter for the command 'VO MD'.

  8. Implemented by Paul Penczek

SUBROUTINES

APMASTER, APRINGS, NORMAS, ALRQS, ALPRBS, CROSRNG_MS, FRNGS, PRB1D, FFTR_D, FFTC_D, APPLYW

CALLER

UTIL4
The following example demonstrates how to apply parameters found 
(in-plane rotation and mirror operation) to the input images:

; x91 - number of images
x91=500
DO LB1 x21=1,x91
   x21=x0
   UD IC,x21,x51,x52,x53,x61,x61,x81
   apmd500
   x53=-x53
   ;
   IF(x51.LT.0) THEN
      MR
      avs{***x81}
      _1
      Y
      RT SQ
      _1
      avt{***x81}
      x53
      (0,0)
      x51=-x51
      x53=x53+180
      IF(x53.LT.360.0) GOTO LB2
         x53=x53-360.0
         GOTO LB2
      ENDIF

      IF(x51.GT.0) THEN
         RT SQ
         avs{***x81}
         avt{***x81}
         -x53
         (0,0)
      ENDIF
   LB2

   ; skip images that do not have reference image
   IF(x51.NE.0) THEN
      SD x21,x51,x52,x53
      apmdcnv
   ENDIF
LB1 
SD E
apmdcnv
EN 

© Copyright Notice /       Enquiries: spider@wadsworth.org