resolution_broaden

Function resolution_broaden 

Source
pub fn resolution_broaden(
    energies: &[f64],
    cross_sections: &[f64],
    params: &ResolutionParams,
) -> Result<Vec<f64>, ResolutionError>
Expand description

Apply Gaussian resolution broadening to cross-section data.

Convolves the input cross-sections with a Gaussian kernel whose width varies with energy according to the instrument resolution function.

§Arguments

  • energies — Energy grid in eV (must be sorted ascending).
  • cross_sections — Cross-sections in barns at each energy point.
  • params — Resolution function parameters.

§Returns

Resolution-broadened cross-sections on the same energy grid.

§Errors

Returns ResolutionError::LengthMismatch if the arrays differ in length, or ResolutionError::UnsortedEnergies if the energy grid is not sorted in non-descending order.