ctfphaseflip(1)                                                ctfphaseflip(1)



NAME
       ctfphaseflip - correct tilt series for microscope CTF by phase flipping

SYNOPSIS
       ctfphaseflip  options

DESCRIPTION
       This program will correct the CTF of an input tilt series by simple
       phase flipping.  The user can select a subset of projection views of
       the input tilt series to correct and can specify a defocus value for
       each selected view through a text defocus file.  The output file of
       ctfplotter is usually used as the defocus file.

       Ctfphaseflip corrects each view strip by strip.  A strip is defined as
       an image region whose defocus difference is less than a user specified
       value, but the width is also limited to 256 pixels.

       It can be run in a parallel mode similiar to the Tilt program by
       setting the TotalViews option.  The script Splitcorrection can be
       used to prepare command files for running the program in parallel.

       A sample command file for running the program with "subm" can be found
       in the IMOD/com directory (ctfcorrection.com).


OPTIONS
       Ctfphaseflip uses the PIP package for input (see the manual page for
       pip).  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 (-inp) OR -InputStack   File name
              Input stack that will be corrected

       -output (-o) OR -OutputFileName     File name
              Name of output file for the corrected views

       -angleFn (-an) OR -AngleFile   File name
              File containing tilt angles for the input stack.  Each line of
              this file is the tilt angle for a view of the input stack.  The
              angles are listed in order starting from view 1.

       -invert (-inv) OR -InvertTiltAngles
              Invert the sign of the tilt angles to compensate for a left-
              handed coordinate system in the microscope.  When the sign of
              the tilt angles and the value of the tilt axis rotation angle
              are such that reconstructions are generated with inverted hand-
              edness, then this option is needed for a proper correction.
              One way to assess this need is to examine the aligned stack
              being corrected, which has its tilt axis vertical.  At positive
              tilt angles, the right side of the images should be more under-
              focused than the left side; if not, then this option is needed.

       -defFn (-defF) OR -DefocusFile      File name
              File with list of tilt angle ranges and defocus values in
              nanometers, such as was output by ctfplotter.  Each line
              should have a starting and ending view number (numbered from 1),
              a starting and ending tilt angle, and a defocus value.  Defocus
              is in nanometers, with positive values for underfocus.  The pro-
              gram will assign that defocus value to the midpoint of the range
              of views.  For a view at a given tilt angle, it will find the
              defocus either by interpolating between two surrounding midpoint
              angles, if there are such angles, or by taking the nearest defo-
              cus value, if the angle is beyond the range of the available
              midpoint angles.  To correct a tilt series with a single value
              of defocus, supply a file with a single line containing "20 20
              0. 0. defocus_value".  If you prepare a defocus file with more
              than line, be sure to use the exact angles from the tilt angle
              file specified with the -angleFn option; do not round to one
              decimal place.  Alternatively, add the number "2" as an extra
              value at the end of the first line of the file; this will pre-
              vent the program from thinking that the view numbers might be
              off by one.

       -xform (-x) OR -TransformFile       File name
              File with the linear transformations that were used to align the
              images.  With this option, the program will use the shifts in X
              to adjust the middle position that is considered to be at the
              nominal defocus value for each image.  Whether this is appropri-
              ate or not needs to be determined by experimentation.

       -defTol (-defT) OR -DefocusTol      Integer
              Defocus tolerance in nanometers that limits the width of the
              strips.  An image region with defocus difference less than this
              tolerance is considered to have constant defocus and can be cor-
              rected as one strip. The strip width is either the width of this
              region or the maxmimum strip width (256 pixels by default),
              whichever is smaller; but strips will also be constrained to be
              at least 128 pixels wide.  Each strip is corrected based on the
              defocus at the center of the strip.

       -maxWidth (-m) OR -MaximumStripWidth     Integer
              Maximum width of strips in pixels.  At lower tilts, the strip
              width will be constrained by this limit even though the defocus
              tolerance would allow a wider strip.  This speeds up the compu-
              tation and may give somewhat more accurate correction since the
              range of defocus in a strip is less, but gives artifactually low
              amplitudes in the Fourier transform right at the zeros of the
              CTF.  Setting the width higher (e.g., half the image size) can
              virtually eliminate this effect at lower tilts.

       -iWidth (-iW) OR -InterpolationWidth     Integer
              The distance in pixels between the center lines of two consecu-
              tive strips.  A pixel inside the region between those two center
              lines resides in both strips. As the two strips are corrected
              separately, that pixel will have 2 corrected values. The final
              value for that pixel is a linear interpolation of the 2 cor-
              rected values.

       -pixelSize (-pi) OR -PixelSize      Floating point
              Image pixel size in nanometers

       -volt (-vo) OR -Voltage   Integer
              Microscope voltage in kV

       -cs (-c) OR -SphericalAberration    Floating point
              Microscope spherical aberration in millimeters.  A value of 0
              can be entered; it will be made slightly larger to prevent divi-
              sion by 0 in the CTF equations.

       -ampContrast (-am) OR -AmplitudeContrast      Floating point
              The fraction of amplitude contrast. For Cryo-EM, it should be
              between 0.07 and 0.14.  The value should be the same as was used
              when detecting the defocus.

       -views (-vi) OR -StartingEndingViews     Two integers
              The starting view and the ending view to correct in this run of
              the program, numbered from 1.  This is an optional field.  The
              default is to correct all views in the input stack.

       -totalViews (-t) OR -TotalViews     Two integers
              The starting view and the ending view that need to be corrected
              in all parallel runs of the program.  This field is only needed
              when doing parallel runs with direct writing to a single output
              file.  The program is run initially with a StartingEndingViews
              entry of -1,-1 to set up the output file.  Then it is run with
              actual starting and ending views for each parallel run, and each
              run writes to the existing output file.

       -boundary (-b) OR -BoundaryInfoFile      File name
              Name of file with information about boundaries between chunks
              and files in which to write lines at the boundaries, when multi-
              ple runs are writing in parallel to an output file.

       -aAngle (-aA) OR -AxisAngle    Floating point
              This option is not supported.  The tilt axis has to be vertical,
              i.e., to be coincident with the Y axis.  Usually this means the
              input stack has to be the aligned stack.

       -param (-pa) OR -Parameter     Parameter file
              Read parameter entries from this file.

       -StandardInput
              Read parameter entries from standard input


AUTHOR
       Quanren Xiong

SEE ALSO
       ctfplotter

BUGS
       Prior to IMOD 4.0.29, Ctfplotter had a bug in which the view numbers
       written to the defocus file were numbered from 0, not 1.  When Ctf-
       phaseflip reads in the defocus file, it will do its best to detect this
       situation and adjust all the view numbers up by 1.  If it does detect
       an inconsistency between view numbers and angular ranges, it will issue
       a warning.  In general, the difference in CTF correction from having
       view numbers off by 1 was insignificant.

       Email bug reports to mast at colorado dot edu.



BL3DEMC                              4.7.3                     ctfphaseflip(1)