## SA - Sum Alignment

(8/01/01)

PURPOSE

To perform vector addition of rotation and shift values from two successive cycles of alignment of an image series. The summed values, saved in registers, can then be applied to the original images. Additive interpolation errors are thus avoided.
This operation is meant for use with the angles and shifts obtained from the 'OR' operations which have to be used with reversed signs in 'RT SQ'.   Example.

 SA P [Sum Alignment - Positive rotation and shift] OR 3A [ORientation search - 3D, Eulerian angles, arbitrary center ||] OR SH [Orientation Search - 2D, rotation & shift, uses polar coords. ||] VO EPT [Vector Operation - Euler angle point rotation] VO IA [Vector Operation - Find Included Angle]

USAGE

.OPERATION: SA [xo],[yo],[zo]

.INITIAL ROTATION ANGLE, X & Y SHIFTS: [ang],[xs],[ys]
[The rotation angle, the x-shift value, and the y-shift value from the initial alignment cycle. These values will typically have been retrieved from a document file by an UNSAVE ('UD') operation just prior to the call to 'SA'.

.REFINED ROTATION ANGLE, X & Y SHIFTS: [angr],[xsr],[ysr]
[The rotation angle, the x-shift value, and the y-shift value from the refinement cycle. These three values can also have been unsaved in the above manner from another document file, or if the 'SA' is performed in the same session (procedure run) as the second cycle, they may simply be current register contents (see below).

The three registers specified on the operation line are output registers, and receive the vector sums for the rotation and shifts.

NOTES

1. Rotational matrix used in 'SA' has form:
cos     -sin
sin     cos
2 This operation is meant for use with the angles and shifts obtained from the 'CC IC' and 'OR' operations which have to be used with reversed signs in 'RT SQ'.

2. 'SA' may be applied most conveniently within the second cycle loop. The intermediate image series (rotated and translated by the amounts found in the first cycle) are realigned against a refined reference, and the values are stored in [angr],[xsr],[ysr]. The values from cycle 1 are then UNSAVEd into [ang],[xs],[ys], and 'SA' is used to obtain [xo],[yo],[zo]. These output values are finally applied to rotate and shift the unaligned original image series. They should also be saved in another document file, using 'SD'. Note that two input and one output series must be on disk at one time. The original images may be deleted individually (within the DO-loop) once the corresponding final, aligned images have been obtained.

3. After having obtained the resulting angle and shifts the 'RT SQ' operation can be applied to rotate and shift an image.

4. In SPIDER 7.10+ input of numbers contained in registers is no longer allowed. Registers are only for output now execept when creating a document file.

SUBROUTINES

SUMALI

CALLER

DRIV1