Name

sxali2d - Perform 2-D reference-free alignment of an image series

Usage

usage in command line:

sxali2d.py stack outdir mask.hdf --ir=inner_radius --ou=outer_radius --rs=ring_step --xr=x_range --yr=y_range --ts=translation_step --dst=delta --center=center --maxit=max_iteration --CTF --snr=SNR --Fourvar --Ng=group_number --Function=user_function_name --MPI

usage in python programming:

ali2d (stack, outdir, maskfile=None, ir=1, ou=-1, rs=1, xr="4 2 1 1", yr="-1", ts="2 1 0.5 0.25", dst=0.0, center=-1, maxit=0, CTF=False, snr=1.0, Fourvar=False, Ng=-1, user_func_name="ref_ali2d", GPUID="", MPI=False)

Typical usage

  1. Initializing header infromation

    • sxheader.py input_stack.hdf --params=xform.align2d --zero
  2. Rotational alignment, set the particle radius:

    • sxali2d.py input_stack.hdf output_directory --ou=27
  3. 2-D alignment, set the particle radius, and x-y range and translational step for translational search:

    • sxali2d.py input_stack.hdf output_directory --ou=27 --xr="3 2 1" --yr="3 2 1" --ts="1 1 0.5"
  4. The above command can be written in Python code as:
    • ali2d(input_stack, output_directory, ou=27, xr="3 2 1", yr="3 2 1", ts="1 1 0.5")

Input

stack

set of 2-D images in a stack file (format hdf or bdb), images have to be square (nx=ny)

maskfile
optional mask file to be used internally during alignment
  • The parameters preceded with -- are optional and default values are given in parenthesis.

  • inner_radius

    inner radius for rotational correlation > 0 (set to 1)

    outer_radius

    outer radius for rotational correlation < nx/2-1 (set to nx/2-2, should be set to the radius of the particle)

    ring_step

    step between rings in rotational correlation > 0 (set to 1)

    x_range
    range for translation search in x direction, search is +/xr (is set to "4 2 1 1", if set to "0" it corresponds to rotational alignment only)
    y_range
    range for translation search in y direction, search is +/yr (is set to same as x_range, if set to "0" it corresponds to rotational alignment only)
    translation_step
    step of translation search in both directions, (set to "2 1 0.5 0.25", larger value increase the speed, but decrease the accuracy)
    delta
    center_type

    -1 - use average centering method (default), 0 - if you do not want the average to be centered, 1 - phase approximation of the center of gravity phase_cog, 2 - cross-correlate with Gaussian function, 3 - cross-correlate with donut shape image (e.g. inner radius=2, outer radius=7), 4 - cross-correlate with reference image provided by user, 5 - cross-correlate with self-rotated average. Centering is performed in user-supplied function.

    max_iteration
    maximum number of iterations the program will perform (default is 0, which means the maximum iteration is 10 and it will automatically stop should the criterion falls, otherwise the number of iteration reach the max_iteration without stop by the criterion)
    CTF

    if this flag is set, the program will use CTF information provided in file headers (for details see I_O). (default no CTF)

    snr
    signal-to-noise ratio of the data (default SNR=1.0)
    Fourvar
    use Fourier variance to weight the reference (recommended, default False)
    group_number
    number of groups in the new CTF filteration
    function

    name of the user-supplied-function that prepares reference image for each iteration (default ref_ali2d)

    MPI
    if this flag is set, use MPI version
    CUDA
    use CUDA program
    GPUID
    ID of GPUs available

    Output

    output_directory
    directory name into which the output files will be written. If it does not exist, the directory will be created. If it does exist, the program will crash and an error message will come up. Please change the name of directory and restart the program . The files will be written to this directory. The program will write two kind of files: the average of the aligned image series (aqc_***.hdf), (aqf_***.hdf), and the Fourier Resolution Criterion curve (drc***). These files are numbered by the iteration number starting at 1, not 0.
    header
    the alignment parameters are stored in the headers of input files as 'xform.align2d'.

    Description

    Method

    Reference

    Penczek 1992

    Author / Maintainer

    Pawel A. Penczek

    Keywords

    category 1
    APPLICATIONS
    category 2
    FOURIER

    Files

    sparx/bin/sxali2d.py, applications.py

    See also

    sxlocal_ali2d, sxmref_ali2d, sxtransform2d

    Maturity

    beta
    works for author, often works for others.

    Bugs

    The centering may fail. It will also fail if the images are not very similar to each other, say circles and rectangles.

    sxali2d (last edited 2015-05-28 19:24:38 by penczek)