extractmagrad(1)                                              extractmagrad(1)



NAME
       extractmagrad - Extract mag gradients for each image from header

SYNOPSIS
       extractmagrad  [options]  input_image_file  output_file

DESCRIPTION
       Extractmagrad will extract information needed to correct for magnifica-
       tion gradients from the header of an image file.  Intensities and tilt
       angles must be present in the extended header of the image file.  In
       addition, a file must be supplied with a table of mag gradients versus
       intensity.

       The program can read either version 1 or version 2 of the mag gradient
       table.  In a version 1 table, each line should contain a Tecnai script-
       ing intensity value between 0 and 1 (not the scaled percent C2 read-
       out), the magnification change in percent per micron of Z height, and
       the image rotation in degrees per micron of Z height.  The lines must
       be in order by increasing intensity.  The program will interpolate
       between values in this table but not extrapolate beyond the first or
       last intensities.  A version 2 table starts with a line with the ver-
       sion number (2), followed by a line with the Tecnai scripting intensity
       at crossover.  After this would be the lines for the magnification and
       rotation at each intensity.  Given this kind of table, the program will
       use the crossover intensity to linearize the data, which improves the
       interpolation between measured points and allows it to extrapolate
       reliably.

       The output of the program is a file containing pixel size and tilt axis
       information plus a tilt angle, mag gradient, and rotation for each
       image in the input file.  This is the information needed by Newstack
       and Xfmodel to adjust images and models for the mag gradients.

OPTIONS
       Extractmagrad uses the PIP package for input (see the manual page for
       pip). Thus, the following options can be specified either as command
       line arguments (with the -) or one per line in a command file (without
       the -).  Options can be abbreviated to unique letters; the currently
       valid abbreviations for short names are shown in parentheses.


       -input (-i) OR -InputImageFile      File name
              Image file with tilt angles and intensities in header

       -output (-o) OR -OutputFile    File name
              Output file for tilt angles and mag gradients.  This file will
              be in the format required for the -gradient entries to Newstack
              and Xfmodel.

       -gradient (-g) OR -GradientTable    File name
              File with table of mag gradients versus intensity (required)

       -rotation (-r) OR -RotationAngle    Floating point
              Angle of rotation of the tilt axis in the images; specifically,
              the angle from the vertical to the tilt axis (counterclockwise
              positive).

       -pixel (-p) OR -PixelSize      Floating point
              Pixel size in nanometers (optional if pixel size is in header)

       -dgrad (-dg) OR -DeltaGradient      Floating point
              Amount to add to all mag gradients, in % per micron of Z height.
              This can be used to experiment with different gradients.

       -drot (-dr) OR -DeltaRotation       Floating point
              Amount to add to all rotations, in degrees per micron of Z
              height

       -help (-h) OR -usage
              Print help output

       -StandardInput
              Read parameter entries from standard input.


HISTORY
       Written by David Mastronarde, 1999
       Converted for PIP input and to get other information, 3/17/04

BUGS
       Email bug reports to mast at colorado dot edu.



BL3DEMC                              4.7.3                    extractmagrad(1)