Name
sxstability - WILL WRITE LATER
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)
- To use MPI version:
- mpirun -np 32 sxali2d.py ... --MPI
- The above example is for mympi.
Typical usage
Rotational alignment, set the particle radius:
- sxali2d.py input_stack.hdf output_directory --ou=27
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"
- 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 for rotational correlation > 0 (set to 1)
outer radius for rotational correlation < nx/2-1 (set to nx/2-2, should be set to the radius of the particle)
step between rings in rotational correlation > 0 (set to 1)
-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.
if this flag is set, the program will use CTF information provided in file headers (for details see I_O). (default no CTF)
name of the user-supplied-function that prepares reference image for each iteration (default ref_ali2d)
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
For the program to work, attribute 'xform.align2d' has to be set in the header of each file. If their values are not known, all should be set to zero, please refer to sxheader.
- The program will start alignment from the current alignment parameter 'xform.align2d' stored in file headers. To erase previous alignment result, set them all to zero.
- The program prints the value of the alignment criterion (see the reference). If the program is started using results of the previous alignment, the initial value of the criterion may be slightly lower than that achieved at the end of the previous alignment - this is due to numerical accuracy and it is not a reason to be concerned. However, for the same reason, the alignment may slightly change during the second run.
The program will not change the input images, only the alignment parameters in their header. In order to apply the alignment parameters to the images, use program sxtransform2d.
Method
Reference
Penczek 1992
Author / Maintainer
Pawel A. Penczek
Keywords
- category 1
- APPLICATIONS
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.