Header Operations: Perform operations on headers of hdf or bdb file.
Usage in command line
sp_header.py stack --params=PARAMS_NAME_LIST --import=INPUT_PARAMS_PATH --export==OUTPUT_PARAMS_FILE --delete --zero --one --set --consecutive --randomize --rand_alpha --print --backup --restore --suffix=PARAMS_FILE_SUFFIX
sp_header does not support MPI.
Print parameterrs:
sp_header.py bdb:file --print --params=xform.projection
Export ctf values to a text file:
sp_header.py bdb:file --export=ctf.txt --params=ctf
Import ctf values from a text file and set them to headers:
sp_header.py bdb:file --import=ctf.txt --params=ctf
Backup current alignment parameters:
sp_header.py bdb:file --backup --suffix=_original --params=xform.projection
Restore original alignment parameters:
sp_header.py bdb:file --restore --params=xform.projection_original
Note: command will recognize the valid name of a parameters and truncate the suffix, thus in this case the restored parameter will be xform_projection.
Delete parameters:
sp_header.py bdb:file --delete --params=xform.projection_original
Note: the parameters will be permanently deleted and cannot be recovered.
This program now works for both hdf and bdb files.
Header Key | Discription | ||
xform.align2d | Use this header entry key to operate on 2D alignment parameters. This automatically includes the parameters “alpha”, “sx”, “sy”, “mirror” and “scale”. | ||
xform.projection | Use this header entry key to operate on projection alignment parameters. This automatically includes the parameters “phi”, “theta”, “psi”, “s2x” and “s2y”. | ||
xform.align3d | Use this header entry key to operate on 3D alignment parameters. This automatically includes the parameters “phi”, “theta”, “psi”, “s3x”, “s3y”, “s3z”, “mirror” and “scale”. | ||
ctf | 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 Reading and writing the image files in SPARX/EMAN2.
header(stack, params, zero, one, randomize, rand_alpha, fimport, fexport, fprint, backup, suffix, restore, delete)
Wei Zhang, Zhengfan Yang
Category 1:: APPLICATIONS
sparx/bin/sp_header.py
Stable:: works for most people, has been tested; test cases/examples available.
There are no known bugs so far.