susan.modules.SubtomoRec

class susan.modules.SubtomoRec[source]

Bases: object

Subtomogram reconstruction engine.

Wraps the susan_rec_subtomos binary. Each selected particle is reconstructed as an individual volume and written to out_dir. Configure the attributes, then call reconstruct().

Attributes

list_gpus_ids

GPU device IDs to use. Default: [0].

Type:

list of int

bandpass

Frequency bandpass applied during back-projection. Default: bandpass(0, -1, 2) (full range, 2-pixel rolloff).

Type:

bandpass

extra_padding

Extra zero-padding (pixels) added on each side before FFT. Default: 0.

Type:

int

padding_type

Fill value for the padded region: 'zero' or 'noise'. Default: 'zero'.

Type:

str

normalize_type

Per-substack normalisation. One of 'none', 'zero_mean', 'zero_mean_one_std' and 'zero_mean_unit_var'. Default: 'none'.

Type:

str

ctf_correction

CTF correction applied during back-projection. One of 'none', 'phase_flip', 'wiener', 'wiener_ssnr', 'pre_wiener'. Default: 'phase_flip'.

Type:

str

format

Output file format: 'mrc' or 'em'. Default: 'mrc'.

Type:

str

ssnr

Ad-hoc SSNR model for Wiener filter denominator. Default: ssnr(1, 0.01).

Type:

ssnr

inversion

Parameters for iterative sampling-function inversion. A std of 0 or less selects it from the gridding method. Default: inversion_params(0, -1) (inversion disabled).

Type:

inversion_params

use_align

Apply stored 3-D alignment offsets during reconstruction. Default: False.

Type:

bool

relion_ctf

Use RELION-style CTF convention (flipped sign). Default: False.

Type:

bool

invert_contrast

Invert the sign of the output volume. Default: False.

Type:

bool

verbosity

Verbosity level passed to the binary. Default: 0.

Type:

int

normalize_output

Normalise the output volume to unit standard deviation. Default: False.

Type:

bool

boost_lowfreq

Optional low-frequency boost before reconstruction. Default: boost_lowfreq_params(0, 3, 10).

Type:

boost_lowfreq_params

Methods

get_args(out_dir, tomos_file, ptcls_in, box_size)[source]

Build the command-line argument string for susan_rec_subtomos.

Parameters:
  • out_dir (str) – Output directory where individual subtomogram files are written.

  • tomos_file (str) – Path to the .tomostxt tomograms file.

  • ptcls_in (str) – Path to the input .ptclsraw particles file.

  • box_size (int) – Subvolume box size in pixels.

Returns:

Space-separated argument string ready to be appended to the susan_rec_subtomos command.

Return type:

str

reconstruct(out_pfx, tomos_file, ptcls_in, box_size)[source]

Execute the subtomogram reconstruction on a single node.

Parameters:
  • out_pfx (str) – Output directory for the reconstructed subtomograms.

  • tomos_file (str) – Path to the .tomostxt tomograms file.

  • ptcls_in (str) – Path to the input .ptclsraw particles file.

  • box_size (int) – Subvolume box size in pixels.

Raises:

RuntimeError – If the susan_rec_subtomos binary returns a non-zero exit code.