pub fn build_active_mask(
energies: &[f64],
range: Option<(f64, f64)>,
) -> Option<Vec<bool>>Expand description
Build a per-bin active mask from the energy grid and an optional
user-specified [E_min, E_max] range. Bin i is active iff
E_min ≤ energies[i] ≤ E_max.
Returns None when range is None so the caller can short-circuit
the all-active common case without allocating.