AP MQ - Alignment - multi-reference, shift & rotation ||

(8/28/03)

PURPOSE

Compares a series of experimental images with a series of reference images. It finds the in-plane rotation angle and X,Y shifts which align each experimental image with the most-similar reference image, The only difference between this operation and 'AP NQ' is how they handle mirroring.
(See align_overview.html for comparison of 'AP' operations.)
OBSOLETE! USE 'AP SH' INSTEAD!

SEE ALSO

AP C [Rotation Alignment - classification, unknown references ||]
AP SH [Alignment - multi-reference, exhaustive rotation & shift ||*]
AP SA [Alignment - reference free, Shift ||]
AP SR [Alignment - reference free, Shift & Rotation ||]

USAGE

.OPERATION: AP MQ

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

.ENTER 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).]

.TRANSLATION SEARCH RANGE, STEP SIZE: 6,2
[The search for translation parameters will be restricted to +/- search range, performed every "step size" pixels.
Restrictions:
1. Search range + last ring <=NX/2-2
2. Search range has to be divisible by step size.]

.FIRST AND LAST RING: 5,15
[Only rings with radii in the range 5-15 will be analyzed.]

.ENTER 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.]

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

.OUTPUT ANGLES DOCUMENT FILE: PARM101
[This is the only output produced by this program. It contains 6 columns for each aligned image:

1. Number of the most similar reference projection.
When this number is negative, the most similar is the mirrored projection (see note 1).

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

3. Angle.
In-plane rotation angle determined.

4. X-shift.
X translation determined.

5. Y-shift.
Y translation determined.

6. Experimental projection number.]

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. Images need not have power-of-two dimensions.

  3. 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.

  4. The output document file created by 'AP MQ' 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.

  5. Alignment parameters (angle and translation included in columns 3-5 of the output document file) can be used in command 'RT SQ' to align images.

  6. 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'.

  7. Implemented by: Paul Penczek.

SUBROUTINES

APMASTER, MRQLI_PS, MRQLI_SS, NORMAS, NORMASC, ALRQ_M, ALRQ_MS, CROSRNG_MS, CROSRNG_DS, FRNG, FRNGS, APPLYWS, ALRQS, PARABLD, RINGWE

CALLER

UTIL4
Example of SPIDER procedure implementing 3D alignment of 
projections following use of 'AP MQ'

;b11.alq
;Rotate and shift images according to the parameters from 'AP MQ' alignment

DO LB1 X55=1,900
   UD IC,X55,X21,X22,X23,X24,X25,X26
   docapmq
   IF (X21.GT.0) THEN
      RT SQ
      win/ser{****x26}
      ali/sar{****x26}
      X23
      X24,X25
   ELSE
      RT SQ
      win/ser{****x26}
      _1
      X23
      X24,X25

      MR
      _1
      ali/sar{****x26}
      Y
   ENDIF
LB1
EN