susan.project.Schedulers¶
Bandpass¶
- class susan.project.Schedulers.Bandpass.Fixed(box_size, fp_max=None)¶
Bases:
objectReturn a copy of current_bandpass with
lowpassclamped tofp_max. Thelowpassset on the aligner before the loop is used unchanged (only clamping is applied).- Parameters:
box_size (int)
fp_max (int, optional) – Hard ceiling on
lowpassin Fourier pixels. Defaults tobox_size // 2 - rolloff(computed from the bandpass rolloff at call time).
- class susan.project.Schedulers.Bandpass.Adaptive(box_size, max_step=None, fp_max=None, reduce='max')¶
Bases:
objectChase the FSC-estimated resolution each iteration.
lowpass = min(bp_est, fp_max). An optionalmax_steplimits how muchlowpasscan increase in a single iteration relative to the current bandpass.- Parameters:
box_size (int)
max_step (float, optional) – Maximum increase in
lowpassper iteration.Nonemeans unlimited.fp_max (int, optional) – Hard ceiling. Defaults to
box_size // 2 - rolloff.reduce (str, optional) – Reduction applied to a per-reference (MRA)
bp_estarray before it is used as a single globallowpass:'max'(default, chase the best-resolving class),'min'(limit to the worst-resolving class), or'mean'(aliases'average'/'avg'). Ignored for a scalarbp_est.
- class susan.project.Schedulers.Bandpass.Ramp(box_size, step=2.5, fp_max=None)¶
Bases:
objectIncrease
lowpassby a fixed step each iteration, capped atfp_max.bp_estis ignored.- Parameters:
box_size (int)
step (float, optional) – Increase per iteration. Default:
2.5.fp_max (int, optional) – Hard ceiling. Defaults to
box_size // 2 - rolloff.
Angular Search¶
- class susan.project.Schedulers.AngularSearch.Fixed(cone_span, cone_step, inplane_span, inplane_step)¶
Bases:
objectReturn constant angular search parameters.
- Parameters:
cone_span (float)
cone_step (float)
inplane_span (float)
inplane_step (float)
- class susan.project.Schedulers.AngularSearch.Adaptive(cone_factor=4, cone_step=1, inplane_factor=4, inplane_step=1, skip_first=True)¶
Bases:
objectBoth cone and inplane spans scale with the current lowpass.
span = factor * arctan2(step_pix, lp)(degrees).- Parameters:
cone_factor (float, optional) – Multiplier for the cone span. Default:
4.cone_step (float, optional) – Step in degrees for the cone search (also used to compute span via
arctan2). Default:1.inplane_factor (float, optional) – Multiplier for the inplane span. Default:
4.inplane_step (float, optional) – Step in degrees for the inplane search. Default:
1.skip_first (bool, optional) – If
True, return(0, 1, 0, 1)whenite == 1. Default:True.
- class susan.project.Schedulers.AngularSearch.ConeOnly(cone_factor=4, cone_step=1, inplane_span=0, inplane_step=1, skip_first=True)¶
Bases:
objectOnly the cone span adapts; inplane is fixed.
- Parameters:
cone_factor (float, optional) – Default:
4.cone_step (float, optional) – Default:
1.inplane_span (float, optional) – Fixed inplane span. Default:
0.inplane_step (float, optional) – Default:
1.skip_first (bool, optional) – Default:
True.
- class susan.project.Schedulers.AngularSearch.InplaneOnly(cone_span=0, cone_step=1, inplane_factor=4, inplane_step=1, skip_first=True)¶
Bases:
objectOnly the inplane span adapts; cone is fixed.
- Parameters:
cone_span (float, optional) – Fixed cone span. Default:
0.cone_step (float, optional) – Default:
1.inplane_factor (float, optional) – Default:
4.inplane_step (float, optional) – Default:
1.skip_first (bool, optional) – Default:
True.
- class susan.project.Schedulers.AngularSearch.AlternatingConeInplane(cone_factor=4, cone_step=1, inplane_factor=4, inplane_step=1, start_with='cone', sync_to_ite=True)¶
Bases:
objectAlternate between cone-only and inplane-only search each call.
On “cone” phases the inplane span is zero; on “inplane” phases the cone span is zero.
- Parameters:
cone_factor (float, optional) – Default:
4.cone_step (float, optional) – Default:
1.inplane_factor (float, optional) – Default:
4.inplane_step (float, optional) – Default:
1.start_with ({'cone', 'inplane'}, optional) – Which search to perform first. Default:
'cone'.sync_to_ite (bool, optional) – If
True, phase =(ite - 1) % 2(cone on odd iterations whenstart_with='cone'). IfFalse, an internal counter is incremented each call and can be reset withreset(). Default:True.
- reset(phase=0)¶
Reset the internal counter.
- Parameters:
phase (int, optional) – Starting phase (0 =
start_with, 1 = the other). Default:0.
Iteration Type¶
- class susan.project.Schedulers.IterationType.Fixed(type_)¶
Bases:
objectAlways return the same iteration type.
- Parameters:
type (str) –
'3D','2D', or'ctf'.
- class susan.project.Schedulers.IterationType.Alternating(odd='ctf', even='2D', sync_to_ite=True)¶
Bases:
objectAlternate between two types based on iteration parity or an internal counter.
- Parameters:
odd (str, optional) – Type for odd iterations (or odd counter values). Default:
'ctf'.even (str, optional) – Type for even iterations (or even counter values). Default:
'2D'.sync_to_ite (bool, optional) – If
True, parity is determined byite % 2. IfFalse, an internal counter is used. Default:True.
- reset(phase=0)¶
Reset the internal counter.
- Parameters:
phase (int, optional) – 0 → next call returns the “even” value; 1 → “odd”. Default:
0.
- class susan.project.Schedulers.IterationType.Cyclic(sequence, sync_to_ite=True)¶
Bases:
objectCycle through a sequence of iteration types.
- Parameters:
sequence (list of str) – Ordered list of types to cycle through, e.g.
['3D', '3D', 'ctf', '2D'].sync_to_ite (bool, optional) – If
True, index =(ite - 1) % len(sequence). IfFalse, an internal counter is used. Default:True.
- reset(phase=0)¶
Reset the internal counter.
- Parameters:
phase (int, optional) – Starting index into the sequence. Default:
0.