Name
sxwindow.py - window out particles with known coordinates from a micrograph.
NOTE: This page is work in progress
Usage
For all micrographs in current directory:
sxwindow.py --coords_dir=info --coords_extension=box --coords_format=eman1 --importctf=ctfparams.txt --indir=./ --resample_ratio=0.5 --box_size=64 --nameroot=mic --micsuffix=hdf --outdir=particles --outsuffix=_ptcls --invert --defocuserror=10 --astigmatismerror=8
For mic0.hdf and mic2.hdf:
sxwindow.py mic0.hdf mic2.hdf --coords_dir=info --coords_extension=box --coords_format=eman1 --importctf=ctfparams.txt --indir=./ --resample_ratio=0.5 --box_size=64 --nameroot=mic --micsuffix=hdf --outdir=particles --outsuffix=_ptcls --invert --defocuserror=10 --astigmatismerror=8
NOTE: The script assumes that a coordinates file has the same name as the associated micrograph except the extension.
NOTE: Please remember to adjust box_size also when setting resample_ratio < 0.1.
Input
- micrograph list
- Input micrographs, if none is specified all files in option --indir are used
Output
- Stack of particle images
Options
- --coords_dir
- Directory containing files with particle coordinates.
- --coords_suffix
- Suffix of coordinate files. For example "_ptcls".
- --coords_extension
- File extension of coordinate files. e.g "box" for eman1, "json" for eman2, ...
- --coords_format
- Format of coordinates file: "sparx", "eman1", "eman2", or "spider". The coordinates of sparx, eman2, and spider format is particle center. The coordinates of eman1 format is particle box corner associated with the original box size.
- --indir
- Directory containing micrographs to be processed. (Default: current directory).
- --importctf
- File name with CTF parameters produced by sxcter.
- --limitctf
- Filter micrographs based on the CTF limit. It requires --importctf. (Default: no filter).
- --resample_ratio
Ratio of new to old image size (or old to new pixel size) for resampling. Valid range is 0.0 < resample_ratio <= 1.0. (Default: 1.0).
- --box_size
x and y dimension in pixels of square area to be windowed. Pixel size after resampling is assumed when resample_ratio < 1.0. Exclude the coordinates if the associated box is not entirely within micrograph. (Default 256).
- --outdir
- Output directory.
- --outsuffix
- Suffix for output stack, e.g. '_ptcls' etc. (Default '_ptcls').
- --micsuffix
- A string denoting micrograph type. (Default 'hdf').
- --nameroot
- Prefix of micrographs to be processed.
- --invert
- Invert image contrast (recommended for cryo data) (Default, no contrast inversion).
- --defocuserror
- Exclude micrographs whose relative defocus error as estimated by sxcter is larger than defocuserror percent. The error is computed as (std dev defocus)/defocus*100%. (Default: include all irrespective of error values).
- --astigmatismerror
- Set to zero astigmatism for micrographs whose astigmatism angular error as estimated by sxcter is larger than astigmatismerror degrees. (Default: include all irrespective of error values).
Description
- Takes micrographs and coordinates as input and writes windowed out particle images to a stack.
- Normalization is done by subtracting the average of the region outside of a circle with radius half of option --box_size.
- Micrographs are applied a Gaussian high-pass Fourier filter with standard deviation of option --box_size.
Author / Maintainer
T. Durmaz and T.Moriya
Keywords
- category 1
- FUNDAMENTALS, UTILITIES, APPLICATIONS
Files
sxwindow.py
See also
Maturity
- alpha
- in development