Skip to main content

resonance_center_energies

Function resonance_center_energies 

Source
pub fn resonance_center_energies(resonance_data: &[&ResonanceData]) -> Vec<f64>
Expand description

Distinct resonance center energies (eV) across every isotope and formalism, sorted ascending.

Used by the energy-scale calibration peak-matching seed (issue #608): the (t0, L_scale) calibration is recovered by matching measured transmission-dip positions to these known resonance energies via the linear TOF relation tof_measured = t0 + L_scale · tof_nominal, which seeds the LM into the global-minimum basin of the (sharply non-convex, post-#608) calibration χ² surface — a basin too thin for a cold start or grid scan to find reliably.

Deduplicated (Copilot PR #609): two resonances at the same center energy (e.g. across isotopes in a grouped fit) are a single POSITION for dip matching — multiplicity is irrelevant — and a duplicate would drive the minimum inter-resonance spacing, and hence the seed’s match_tol, to 0, rejecting every dip and silently dropping the seed to a cold start.