stackframemdocs(1)          General Commands Manual         stackframemdocs(1)



NAME
       stackframemdocs - Combine frame stack mdoc files into valid image file
       mdoc

SYNOPSIS
       stackframemdocs [options] [frame stack name] [output root name]

DESCRIPTION
       Stackframemdocs is a Python script that will concatenate a set of
       "frame stack" metadata (.mdoc) files saved by SerialEM for each set of
       frames from a camera that can acquire images in multiple frames.  The
       files have a single section named "FrameSet" to distinguish them from a
       valid .mdoc file associated with an image file, which would have a sec-
       tion named "ZValue" for each image in the file.  This program will pro-
       duce a single .mdoc file that is valid for use in Alignframes or for
       dose weighting with Mtffilter.

       Alignframes in particular is expecting to receive an .mdoc file that
       corresponds to a summed image stack (generally a tilt series) saved
       from SerialEM, where each frame file is listed in the .mdoc file.  It
       is looking for all the items that can be provided by options below.  In
       each case, if the option is not entered here, Stackframemdocs will
       obtain the value from the first frame stack .mdoc or the frame stack
       that it corresponds to.  In order for a frame stack to be used to find
       a value, it must be present in the directory with the .mdoc files.  The
       program uses these entries as follows:

       DataMode: Alignframes uses this to set the mode of its output file,
       unless the Alignframes -mode option is entered with the mode to use.
       If the frame stacks are bytes, you will want to enter the -mode to
       change it either here or when running Alignframes.

       SizeInXandY: Alignframes compares these sizes to those of the output
       stack, after any specified rotation and flip.  It determines a relative
       integer binning in each dimension and makes sure that the X and Y
       sizes, with this binning taken into account, correspond closely enough
       between the mdoc and the output stack.  This may not be the case for
       non-square images if there is a +/-90 degree rotation of the aligned
       sums and the sizes are taken directly from a frame stack.  In such a
       case, you should enter the frame sizes, with X and Y transposed.  Oth-
       erwise, it should be safe to allow Stackframemdocs to take the size
       from the frame file.  If the relative binning is 1 and the size in the
       .mdoc file is slightly less than the frame sizes, Alignframes will trim
       the aligned images so that their sizes correspond to those of an origi-
       nal summed image stack from SerialEM.  If you want Alignframes output
       to have the exact size that such a stack would have, you should enter
       the size here.

       PixelSpacing: Alignframes requires this value but uses it only to set
       the value in an adjusted .mdoc file that it outputs, scaling by the
       relative binning determined from the size comparisons.

       Note that these .mdoc files can also be combined by Newstack, if it
       is given a corresponding set of single-image files (e.g., aligned
       sums).

OPTIONS
       When the program is invoked with fewer than two arguments or with -h,
       it gives a usage statement that shows the currently allowed abbrevia-
       tions to the short option names.

       -frame (-f) OR -FrameSetMdoc File
              Name of one frame stack .mdoc file.  These names can entered
              either multiple times with this option or as non-option argu-
              ments on the command line.

       -imageroot (-i) OR -ImageRootOfOutputName File
              Name of image file to which this .mdoc file would correspond.
              This name is used in two ways: to provide the "ImageFile" entry
              in the output .mdoc file, and for the name of the output file,
              with ".mdoc" appended.  If this option is not entered, the last
              non-option argument on the command line is used for this name.

       -mode (-m) OR -DataMode Integer
              This entry provides the "DataMode" entry in the output file (see
              above).  If this option is not entered, the program will try to
              obtain the mode from the first frame file, which may not be
              appropriate.

       -size (-s) OR -SizeInXandY Two integers
              This entry provides the "ImageSize" entry in the output .mdoc
              file (see above).  If this option is not entered, the program
              will try to obtain the size from the first frame file.

       pixel (-p) OR -PixelSpacing Float
              This entry provides the "PixelSpacing" entry in the output .mdoc
              file (see above).  If this option is not entered, the program
              will use the value in the first frame stack .mdoc file.

       -help (-h) OR -usage
              Print a usage statement and exit.

AUTHOR
       David Mastronarde  <mast at colorado dot edu>

SEE ALSO
       Alignframes, Mtffilter, Newstack



                                                            stackframemdocs(1)