Name
sxshiftali - Determines shift parameters for aligning a 2D image series. The computed shift parameters are always integers.
Usage
Usage in command lines:
sxshiftali.py stack outdir <maskfile> --search_rng --ou=outer_radius --maxit=max_iteration --CTF --snr=SNR --Fourvar=Fourier_variance --oneDx --MPI
Usage in python programming:
shiftali_MPI(stack, outdir, maskfile=None, ou=-1, maxit=100, CTF=False, snr=1.0, Fourvar=False, search_rng=-1, oneDx=False')
Currently, there is only the MPI version.
- To use MPI version:
- mpirun -np 2 sxshftali.py
- The above example is for mympi.
Typical usage
1. Compute shift alignment parameters for images in input stack and save to header in attribute 'xform.align2d'
mpirun -np 2 sxshftali.py input_stack output_directory --outstack='aligned_stack.hdf'
2. Compute shift alignment parameters for images in input stack, apply the computed parameters to the images, and save results to an output stack. The input images are not changed.
mpirun -np 2 sxshftali.py input_stack output_directory --Applyparams --outstack='aligned_stack.hdf'
Input
- stack
- set of 2-D images in a stack file (format hdf or bdb), images need not be square.
- maskfile
- optional mask file to be used internally during alignment. Default is a circle mask with radius min(nx, ny)//2 - 2, where nx and ny are the x and y dimensions respectively of the input data. outdir::output directory, cannot already exist.
The parameters preceded with -- are optional and default values are given in parenthesis.
if this flag is set, the program will use CTF information provided in file headers (for details see I_O). (default no CTF)
Output
- 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 not change the input images. It will store the alignment parameters in the image headers. To apply the alignment parameters to the images in input stack itself, use program sxtransform2d.
Method
Reference
Author / Maintainer
Jia Fang
Keywords
- category 1
- APPLICATIONS
Files
sparx/bin/sxshiftali.py
See also
Maturity
- beta
- works for author, often works for others.