susan.project.SubtomoAvgCore

class susan.project.SubtomoAvg.SubtomoAvgCore(prj_name, box_size=None)[source]

Bases: SubtomoAvgBase

Pipeline layer: overridable steps between project setup and output.

Concrete subclasses implement run_estimation(), select_particles(), run_reconstruction(), and run_postprocessing(). run_iteration() orchestrates the full sequence and can also be overridden.

Users who want to customise just one step should subclass SubtomoAvg and override the relevant method rather than this class.

Warning

Developer-only. SubtomoAvgCore defines the overridable pipeline steps that sit between project setup and output. To customise a single step, subclass SubtomoAvg and override the relevant method rather than using this class directly.

Iteration Execution

setup_iteration(ite) → tuple[_IterationFiles, _IterationFiles][source]

Create the iteration directory and validate previous outputs.

Parameters:

ite (int) – Iteration number (≥ 1).

Returns:

(cur, prv) — _IterationFiles for this and the previous iteration.

Return type:

tuple

Raises:

NameError – If the previous iteration’s files are missing.

run_estimation(cur, prv)[source]

Run alignment or CTF refinement.

Parameters:
  • cur (_IterationFiles)

  • prv (_IterationFiles)

select_particles(cur, prv)[source]

Select particles and write cur.ptcl_temp.

Parameters:
  • cur (_IterationFiles)

  • prv (_IterationFiles)

run_reconstruction(cur, prv)[source]

Reconstruct maps and update cur.reference.

Parameters:
  • cur (_IterationFiles)

  • prv (_IterationFiles)

run_postprocessing(cur, prv) → float | ndarray[source]

Compute resolution estimates and apply post-reconstruction filtering.

Parameters:
  • cur (_IterationFiles)

  • prv (_IterationFiles)

Returns:

Estimated resolution in Fourier pixels.

Return type:

float or numpy.ndarray

run_iteration(ite) → float | ndarray[source]

Run a complete STA iteration.

Parameters:

ite (int) – Iteration number (≥ 1).

Returns:

Estimated resolution in Fourier pixels.

Return type:

float or numpy.ndarray