matchrotpairs(1)                                              matchrotpairs(1)

       matchrotpairs - find transform between best matching pair of rotated

       matchrotpairs [options] file_a file_b output_transform

       Matchrotpairs is used to find the transformation between two images
       rotated by about 90 degrees from each other.  This transformation is
       then supplied to Finddistort, which will use it to compute the abso-
       lute stretch component of an image distortion field.  However, the
       stretch cannot be computed accurately if one of the images is of a
       tilted specimen, because a tilt will shrink the image slightly perpen-
       dicular to the tilt axis.  Also, the specimen cannot be assumed to be
       horizontal at zero tilt.  The solution to these problems is to use a
       specimen with some features distributed at different heights, take a
       small tilt series of the specimen (e.g., at -4, -2, 0, 2, and 4
       degrees), rotate it by 90 degrees, and take another such tilt series.
       Matchrotpairs can then be used to search for the pair of views from the
       two series that match the best, using essentially the same procedure as
       in Transferfid.  The difference between these images can then be
       assumed to be the result of the rotation alone, even if the specimen is
       tilted in each of these two views.

       The recommended procedure would be to run Finddistort first to find
       a zero-stretch distortion field, and to supply this field to Matchrot-
       pairs.  The two best matching images will be undistorted and these
       undistorted images should then differ only by a stretch, allowing the
       stretch to be determined with the greatest accuracy.

       -za z1,z2
              The starting and ending sections from the first input file to
              include in the search, numbered from 1.  The default is to use
              all sections from the first file.

       -zb z1,z2
              The starting and ending sections from the second input file to
              include in the search, numbered from 1.    The default is to use
              all sections from the second file.  Note that the two tilt
              series can be placed in the same file, that file name can be
              given for both input files, and the -za and -zb options can be
              used to indicate where the two tilt series are in the file.

       -a value
              Use this option to specify the direction of rotation from the
              first to the second axis.  Only the sign of this number matters,
              so you can enter -1 or -90 for clockwise rotations, or 1 or 90
              for counterclockwise rotations.  In the absence of this option,
              the program will consider both directions of rotation.

       -m     Run Midas on the central pair of views, and use the alignment
              that you set in Midas as the initial alignment for all pairs of
              views that are considered.  A correction for stretch will be
              applied in the initial alignment of the other pairs and may be
              needed in some cases.

       -d file
              Name of file with zero-stretch image distortion field from Find-

       -b value
              The binning of the images, which usually needs to be specified
              when undistorting.

       -t     Leave temporary files in /usr/tmp or its equivalent for diagnos-
              ing problems.

       -P     Output process ID.

       The best matching pair will be undistorted if the -b option is given
       and stacked into a file with the root name of the output file and the
       extension ".stack".  If the output file already exists, a backup image
       of the original is created with the ~ extension.

       David Mastronarde  <mast at colorado dot edu>

       finddistort, transferfid, midas

BL3DEMC                              4.7.3                    matchrotpairs(1)