susan.modules.Averager¶
- class susan.modules.Averager[source]¶
Bases:
objectMap reconstruction (averaging) engine for subtomogram averaging.
Wraps the
susan_reconstructbinary. Configure the attributes, then callreconstruct()(single-node) orreconstruct_mpi()(multi-node MPI).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:
- extra_padding¶
Extra zero-padding (pixels) added on each side before FFT. Default:
0.- Type:
int
- rec_halfsets¶
If
True, reconstruct separate half-maps (needed for FSC). Default:False.- Type:
bool
- 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:'zero_mean_one_std'.- Type:
str
- weighting_type¶
Particle weighting scheme. One of
'none','particle','projection','3DCC','2DCC'. Default:'none'.- Type:
str
- ctf_correction¶
CTF correction applied during back-projection. One of
'none','phase_flip','wiener','wiener_ssnr';'wiener_atan'and'wiener_lgstc'are experimental. Default:'wiener'.- Type:
str
- gridding_type¶
Fourier-space gridding method:
'linear'or'kb'(Kaiser–Bessel). Default:'kb'.- Type:
str
- splat_gain¶
Experimental. Angular-spread splatting. When greater than 0, the bandpass lowpass and the per-projection
def_mresstop acting as a cutoff and instead set the width of a tangential gaussian insertion kernel, so every frequency up to Nyquist is inserted, progressively blurred rather than truncated. The width isclamp(splat_gain*0.4*R/R_ref, 0.4, 1.5)fourier pixels withR_ref = min(lowpass, def_mres), so it is flat (and equivalent to trilinear) up toR_ref/splat_gainand then grows.1is the physically anchored value; larger distrusts the stated resolution more and starts blurring earlier. Overridesgridding_type. Costs roughly 4x more time in the insertion stage than linear gridding. Default:0(disabled, ordinary reconstruction).- Type:
float
- symmetry¶
Point-group symmetry applied to the reconstructed map. Default:
'c1'.Value
Description
'c1'/'none'No symmetry (identity).
'cN'/'CN'Cyclic N-fold (e.g.
'c4').'dN'/'DN'Dihedral N-fold (e.g.
'd2').'cbo'/'CBO'Cuboctahedral (order 24).
'ico'/'ICO'/'i2'/'I2'Icosahedral, I2 convention (order 60; RELION default).
'i1'/'I1'Icosahedral, I1 convention.
'i3'/'I3'Icosahedral, I3 convention.
'i4'/'I4'Icosahedral, I4 convention.
'cone_flip'/'y_180'180° rotation about the Y axis.
- Type:
str
- inversion¶
Parameters for iterative sampling-function inversion. A
stdof0or less selects it from the gridding method. Default:inversion_params(10, -1).- Type:
- mpi¶
MPI launcher configuration used by
reconstruct_mpi(). Default:mpi_params('srun -n %d ', 1).- Type:
- verbosity¶
Verbosity level passed to the binary. Default:
1.- Type:
int
- normalize_output¶
Normalise the output map to unit standard deviation. Default:
True.- Type:
bool
- ignore_classes¶
Ignore reference-class assignments; reconstruct all particles. Default:
False.- Type:
bool
- boost_lowfreq¶
Experimental. Optional low-frequency boost before reconstruction. Default:
boost_lowfreq_params(0, 0, 0)(disabled).- Type:
Methods
- get_args(out_pfx, tomos_file, ptcls_in, box_size)[source]¶
Build the command-line argument string for
susan_reconstruct.- Parameters:
out_pfx (str) – Output path prefix; maps are written as
<out_pfx>_class001.mrcetc.tomos_file (str) – Path to the
.tomostxttomograms file.ptcls_in (str) – Path to the input
.ptclsrawparticles file.box_size (int) – Subvolume box size in pixels.
- Returns:
Space-separated argument string ready to be appended to the
susan_reconstructcommand.- Return type:
str
- reconstruct(out_pfx, tomos_file, ptcls_in, box_size)[source]¶
Execute the reconstruction on a single node.
- Parameters:
out_pfx (str) – Output path prefix for the reconstructed maps.
tomos_file (str) – Path to the
.tomostxttomograms file.ptcls_in (str) – Path to the input
.ptclsrawparticles file.box_size (int) – Subvolume box size in pixels.
- Raises:
RuntimeError – If the
susan_reconstructbinary returns a non-zero exit code.
- reconstruct_mpi(out_pfx, tomos_file, ptcls_in, box_size)[source]¶
Execute the reconstruction using MPI across multiple nodes.
The MPI command is taken from
mpi.- Parameters:
out_pfx (str) – Output path prefix for the reconstructed maps.
tomos_file (str) – Path to the
.tomostxttomograms file.ptcls_in (str) – Path to the input
.ptclsrawparticles file.box_size (int) – Subvolume box size in pixels.
- Raises:
RuntimeError – If the MPI binary returns a non-zero exit code.