susan.utils.datatypes¶
- class susan.utils.datatypes.fsc_info(fpix: float, res: float)[source]¶
Bases:
objectResolution estimate returned by
susan.utils.fsc_analyse().Attributes
- fpix¶
Resolution in Fourier pixels.
- Type:
float
- res¶
Resolution in Ångstroms.
0.0if the FSC never drops below the requested threshold.- Type:
float
- class susan.utils.datatypes.ssnr(S: float, F: float)[source]¶
Bases:
objectAd-hoc SSNR model used by
susan.modules.Alignerandsusan.modules.Averager.The spectral signal-to-noise ratio is modelled as:
\[SSNR(s) = 10^{3S} \cdot e^{-100 F s}\]where s is the spatial frequency in 1/Angstrom (\(s = r/(N \cdot apix)\), with r the Fourier-pixel radius and N the box size). This is the SSNR of a single projection, not of the reconstructed map: the term \(1/SSNR(s)\) is added to the Wiener denominator once per projection, so the resulting filter does not depend on how many particles or tilts contribute. See the Ad-hoc SSNR definition for background.
Attributes
- S¶
Strength parameter: the SSNR at zero frequency is \(10^{3S}\). Typically set to 1.
- Type:
float
- F¶
Fall-off parameter, typically in the range 0 – 0.5. The SSNR loses one decade every \(0.023/F\) 1/Angstrom. Its value depends on the noise level of the data. With
S = 1, the Wiener filter reaches half power at roughly \(16 \cdot F\) Angstrom.- Type:
float
- class susan.utils.datatypes.bandpass(highpass: float, lowpass: float, rolloff: float)[source]¶
Bases:
objectBandpass filter descriptor with cosine-decay edges.
The filter is flat between
highpassandlowpassand uses a cosine rolloff of widthrolloffat both edges.Attributes
- highpass¶
High-pass cutoff in Fourier pixels.
- Type:
float
- lowpass¶
Low-pass cutoff in Fourier pixels.
- Type:
float
- rolloff¶
Width of the cosine taper at each edge, in Fourier pixels.
- Type:
float
- class susan.utils.datatypes.search_params(span: float, step: float)[source]¶
Bases:
objectGeneric angular or offset search range and step.
Attributes
- span¶
Total search range (half-range is
span / 2).- Type:
float
- step¶
Step size of the search.
- Type:
float
- class susan.utils.datatypes.offset_params(span: list, step: float, kind: str)[source]¶
Bases:
objectOffset (translation) search parameters.
Attributes
- span¶
Offset range in 3-D, ordered
[X, Y, Z].- Type:
list of float
- step¶
Offset step size in pixels. For 3-D searches defaults to 1 but also accepts sub-pixel values such as 0.5 or 0.25. For 2-D searches it is fixed to 1.
- Type:
float
- kind¶
Shape of the search volume. Valid options for 3-D searches:
'ellipsoid'(default),'cylinder','cuboid'. For 2-D searches only'circle'is accepted.- Type:
str
- class susan.utils.datatypes.refine_params(levels: int, factor: int)[source]¶
Bases:
objectMulti-level angular refinement parameters.
Modelled after DYNAMO’s angular refinement policy.
Attributes
- levels¶
Number of refinement levels. Each level halves the angular step.
- Type:
int
- factor¶
Range multiplier per level. Given the angular step ang at the current level, the search range is ±``factor`` · ang.
- Type:
int
- class susan.utils.datatypes.range_params(min_val: int, max_val: int)[source]¶
Bases:
objectInteger range descriptor.
Attributes
- min_val¶
Minimum value (inclusive).
- Type:
int
- max_val¶
Maximum value (inclusive).
- Type:
int
- class susan.utils.datatypes.mpi_params(cmd=None, arg=None)[source]¶
Bases:
objectConfiguration for launching MPI-parallel processing modules.
The MPI binary is invoked roughly as:
cmd = mpi_params.cmd % mpi_params.arg + ' susan_aligner_mpi ' + aligner.get_args() os.system(cmd)
Attributes
- cmd¶
Base MPI launch command, e.g.
'srun -n %d'(SLURM) or'mpirun -n %d'(generic MPI).Nonedisables MPI.- Type:
str or None
- arg¶
Argument substituted into
cmd(typically the number of nodes). Defaults toNone(no substitution).- Type:
int or None
Methods
- class susan.utils.datatypes.inversion_params(ite: int, std: float)[source]¶
Bases:
objectParameters for iterative inversion of the sampling function.
Note
This is an advanced parameter. The defaults work well in most cases; change only if you understand the sampling-function correction.
Used to correct for non-uniform angular sampling in reconstruction. See Pipe & Menon (1999).
Attributes
- ite¶
Number of iterations. Default: 10.
- Type:
int
- std¶
Standard deviation of the Gaussian used to approximate the gridding kernel. Values of
0or less select it from the gridding method:0.41for linear,0.69for Kaiser-Bessel,0.74when splatting. Default:-1(automatic).- Type:
float
- class susan.utils.datatypes.boost_lowfreq_params(scale: float, value: float, decay: float)[source]¶
Bases:
objectLow-frequency boost for reconstructions with few particles.
Warning
This is an experimental feature. Results may change in future versions and the parameter defaults have not been validated on all data types.
Applies an extra multiplicative weight to the lowest spatial frequencies before reconstruction.
Attributes
- scale¶
Strength of the boost. Typically 5–10.
- Type:
float
- value¶
Frequency up to which the boost is applied, in Fourier pixels. Typically 2–5.
- Type:
float
- decay¶
Width of the cosine decay that tapers the boost to zero. Typically 3–6.
- Type:
float