Name
sxfind_struct - use the "common line" algorithm to assign initial values of phi, theta, psi to 2D average projections.
Usage
Usage in command lines:
sxfind_struct.py prj_stack outdir --ir --ou --delta --dpsi --lf --hf --rand_seed --maxit --debug --noweights --trials --given --first_zero --weights --MPIGA --pcross --pmut --maxgen --MPI --trials
Usage in python programing:
sxfind_struct(stack, out_dir, ir, ou, delta, dpsi, lf, hf, rand_seed, maxit, given = False, first_zero = False, flag_weights = False, debug = False, trials = 1)
Example:
sxfind_struct.py ave_15.hdf voronoi --ou=26 --delta=8 --lf=0.05 --hf=0.25 --rand_seed=10 --maxit=30
Note: the 2D input images have to be centered. The program does not determine translation parameters, it only finds the Eulerian angles.
Input
- prj_stack
- projection stack file
- outdir
- output directory
The parameters preceded with -- are optional and default values are given in parenthesis.
outer radius used to the circle mask applied to the projections, ou is also used to set the length of 1D line projection =2*ou+1 (default ou=nx/2-1, where nx is the width of 2D image projection)
accuracy of the angular search. Delta accuracy will define a set of quasi-evenly distributed projections directions to be used in the program (distribution 'P' of even_angles)
for each 1D line projection only frequencies between minimum and maximum will be used, lf define the low frequency (default 0.0)
for each 1D line projection only frequencies between minimum and maximum will be used, hf define the high frequency (default 0.5)
if present, set the initial angles of projections according the angles included in the header of each projection as objects xform.projection (default False)
Output
- outdir/angles_000
- this file contains Eulerian angles fount in trial #000 (if there were more trials requested, there will be more files numbered 001, 002, and so on)
- outdir/plot_agls_000.hdf
this image in the hdf format contains visualization of the distribution of projections found during trial #000 (see also sxplot_projs_distrib)
- outdir/structure_000.hdf
copy of the stack of 2D projections with Eulerian angles found at trial #000 set in the header. In order to examine the structure, one has to do the 3D reconstructions sxrecons3d_n.py outdir/structure_000.hdf myvol.hdf
- outdir/structure.hdf
- for multiple trials, it is a copy of the stack of 2D projections with Eulerian angles found at the best trial set in the header.
Description
Method
As described in the reference paper below, with modification of a full 2D Voronoi diagram on a sphere.
How to use the function sxfind_struct:
If the input stack contain already angles information (phi, theta, psi) for each projection, copy your file to a backup, because the program will overwrite the parameter xform.proj. In order to select the accuracy of the angle search delta, some examples below show the number of angles used in the list according the delta value:
- delta=20 list of 91 angles evenly distributed
- delta=10 list of 387 angles evenly distributed
To get a quick view of the structure found, use this function (sxrecons3d_n) to reconstruct the volume:
- sxrecons3d_n.py prj_stack.hdf myvol.hdf
The structure found depends on the random initialization of the program, controled by the option value random_seed. To improve the structure run many times the algorithm with different seed values. Select the best structure according the criterion Discrepancy wrote in the logfile. A lower criterion mean a better structure.
Reference
Penczek, P., Zhu, J. and Frank, J.: A common-lines based method for determining orientations for N>3 particle projections simultaneously. Ultramicroscopy 63:205-218, 1996.
Author / Maintainer
Julien Bert
Keywords
- category 1
- APPLICATIONS
Files
applications.py
See also
Maturity
- stable
- works for most people, has been tested; test cases/examples available.