Name

sxheader - Perform operations on headers of hdf or bdb file

Usage

Usage in command lines:

sxheader.py stack.hdf --params="parm1 parm2 ..." --zero --one --randomize -- rand_alpha --import=filename --export=filename --print --backup --restore --suffix --delete

Usage in python programming:

header(stack, params, zero, one, randomize, rand_alpha, fimport, fexport, fprint, backup, suffix, restore, delete)

Input

stack
image stack file (can be bdb or hdf)

Options

params
list of parameters to perform operations on.

If operating on 2D alignment parameters, use "xform.align2d", which automatically includes the parameters "alpha", "sx", "sy", "mirror" and "scale".

If operating on projection alignment parameters, use "xform.projection", which automatically includes the parameters "phi", "theta", "psi", "s2x" and "s2y".

If operating on 3D alignment parameters, use "xform.align3d", which automatically includes the parameters "phi", "theta", "psi", "s3x", "s3y", "s3z", "mirror" and "scale".

Contrast Transfer Function is accessible as object "ctf" and involves six parameters: defocus [microns], cs [mm], voltage [kV], apix [A], bfactor [A^2], ampcont [%], astigmatism amplitude, astigmatism angle.

See description of parameters http://sparx-em.org/sparxwiki/I_O

zero
set all parameters to zero.
one
set all parameters to one (not applicable to xform.align2d, xform.proj or xform.align3d, since it doesn't make sense).
randomize
set all parameters to randomized value (only works for xform.align2d, xform.proj and xform.align3d, there is little need to randomize other parameters, and it is also difficult to guess the random range beforehand.)
rand_alpha
set all angles to randomized value
import
import parameters from file.
export
export parameters to file.
print
whether print parameters to screen.
backup
backup all parameters
restore
restore all parameters
suffix
suffix which will be added to the name of a parameter or removed during restore.
delete
delete all parameters

Typical usage

Print parameterrs:

Export ctf values to a text file:

Import ctf values from a text file and set them to headers:

Backup current alignment parameters:

Restore original alignment parameters:

Delete parameters:

Description

This program now works for both hdf and bdb files.

Author / Maintainer

Wei Zhang, Zhengfan Yang

Keywords

category 1
APPLICATIONS

Files

applications.py

Maturity

stable
works for most people, has been tested; test cases/examples available.

Bugs

None. It is perfect.

sxheader (last edited 2014-09-05 18:54:45 by penczek)