susan.project.SubtomoAvgSched¶
Warning
Experimental / in development. The scheduler protocol, built-in
schedulers in susan.project.Schedulers, and the factory presets
(make_*_refinement) may change between releases. Use
SubtomoAvg directly for stable
manual loops.
- class susan.project.SubtomoAvgSched.SubtomoAvgSched(prj_name, box_size=None)[source]¶
Bases:
SubtomoAvgSubtomogram averaging with optional per-iteration schedulers.
Warning
Experimental / in development. The scheduler protocol and the factory presets may change between releases. Use
SubtomoAvgdirectly for stable manual loops.Extends
SubtomoAvgwith three scheduler slots and arun()loop. Leaving a scheduler asNonekeeps that setting unchanged each iteration.- Parameters:
prj_name (str) – Project directory.
box_size (int, optional) – Box size in pixels. Reads
info.prjtxtwhen omitted.
- bandpass_scheduler¶
Signature:
new_bp = sched(ite, bp_est, current_bandpass). Result is assigned to bothaligner.bandpassandctf_refiner.bandpass. Default:None.- Type:
callable or None
- angular_search_scheduler¶
Signature:
(cs, css, is_, iss) = sched(ite, lp). Result is unpacked intoaligner.set_angular_search(*result). Default:None.- Type:
callable or None
- iteration_type_scheduler¶
Signature:
type_str = sched(ite). Result is assigned toself.iteration_type. Default:None.- Type:
callable or None
Automated Loop
- run(start, end, reset=False)[source]¶
Run iterations from start to end (inclusive).
Schedulers are applied before each iteration.
bp_estpassed to the bandpass scheduler is the resolution estimate (Fourier pixels) returned by the previous iteration (oraligner.bandpass.lowpassfor the very first call).- Parameters:
start (int) – First iteration number.
end (int) – Last iteration number (inclusive).
reset (bool, optional) – If
True, callreset()on all schedulers that support it before starting the loop. Default:False.
- Returns:
Per-iteration resolution estimates in Fourier pixels, one entry per iteration.
- Return type:
list of float or numpy.ndarray
Factory Presets
- classmethod make_3d_refinement(prj_name, box_size=None, *, lp_init=30.0, lp_max=None, lp_step=2.5, cone_factor=4, inplane_factor=4, tomogram_file=None, initial_reference=None, initial_particles=None)[source]¶
3-D closed-loop refinement with adaptive angular search.
Bandpass chases the FSC estimate (clamped by lp_max); angular search spans scale with the current lowpass. First iteration uses no angular search (
skip_first=True).- Parameters:
prj_name (str)
box_size (int, optional)
lp_init (float, optional) – Starting lowpass in Fourier pixels. Default:
30.lp_max (float, optional) – Bandpass ceiling. Defaults to
box_size // 2 - rolloff.lp_step (float, optional) – Maximum lowpass increase per iteration. Default:
2.5.cone_factor (float, optional) – Angular span multipliers. Default:
4.inplane_factor (float, optional) – Angular span multipliers. Default:
4.tomogram_file (str, optional) – Written to
info.prjtxtonly when provided (existing project files are left untouched otherwise).initial_reference (str, optional) – Written to
info.prjtxtonly when provided (existing project files are left untouched otherwise).initial_particles (str, optional) – Written to
info.prjtxtonly when provided (existing project files are left untouched otherwise).
- Return type:
- classmethod make_2d_refinement(prj_name, box_size=None, *, lp_init=45.0, lp_max=None, lp_step=2.5, inplane_factor=4, tomogram_file=None, initial_reference=None, initial_particles=None)[source]¶
2-D in-plane refinement with adaptive inplane angular search.
- Parameters:
prj_name (str)
box_size (int, optional)
lp_init (float, optional) – Default:
45.lp_max (float, optional)
lp_step (float, optional) – Default:
2.5.inplane_factor (float, optional) – Default:
4.tomogram_file (str, optional)
initial_reference (str, optional)
initial_particles (str, optional)
- Return type:
- classmethod make_mixed_ctf_2d(prj_name, box_size=None, *, lp_init=45.0, lp_max=None, lp_step=2.5, cone_factor=4, inplane_factor=4, odd='ctf', even='2D', tomogram_file=None, initial_reference=None, initial_particles=None)[source]¶
Interleaved CTF + 2-D refinement with shared bandpass tracking.
- Parameters:
prj_name (str)
box_size (int, optional)
lp_init (float, optional) – Default:
45.lp_max (float, optional)
lp_step (float, optional) – Default:
2.5.cone_factor (float, optional) – Default:
4.inplane_factor (float, optional) – Default:
4.odd (str, optional) – Iteration types for odd and even iterations. Default:
'ctf'/'2D'.even (str, optional) – Iteration types for odd and even iterations. Default:
'ctf'/'2D'.tomogram_file (str, optional)
initial_reference (str, optional)
initial_particles (str, optional)
- Return type: