Expand description
Resolution broadening via convolution with instrument resolution function.
Convolves theoretical cross-sections (or transmission) with the instrument resolution function to account for finite energy resolution. The resolution function is modeled as a Gaussian with energy-dependent width, optionally combined with an exponential tail, derived from time-of-flight instrument parameters.
§SAMMY Reference
rsl/mrsl1.f90— Main RSL resolution broadening routines (Resbrd)rsl/mrsl4.f90— Resolution width calculation (Wdsint, Rolowg)rsl/mrsl5.f90— Exponential tail peak shift (Shftge)fnc/exerfc.f90— Scaled complementary error functionconvolution/DopplerAndResolutionBroadener.cpp— Xcoef quadrature weights- Manual Section III.C (Resolution Broadening); quadrature Eq. IV B 3.8
(R3-revision numbering — see
compute_xcoef_weightsand the Gaussian+exponential path inresolution_broaden_presorted)
§Width convention — read before supplying a number
Every width here is a W-parameter, the width appearing in
exp(-x²/W²), not a standard deviation. The two differ by √2:
σ = W/√2 FWHM = 2·√(ln 2)·W = 1.6651·W
This is SAMMY’s convention, and it is the same one the Doppler width Δ_D uses, so the two broadening kernels compose without a conversion. Supplying a 1σ value where a W is expected yields a kernel √2 too narrow — 29 % — and a resolution that is too narrow is absorbed into a fitted temperature that is too high.
ResolutionParams::from_sigma and ResolutionParams::from_fwhm convert
for you. Use them rather than scaling by hand.
SAMMY’s own inputs are in yet other measures — Deltag is a FWHM and
Deltal is the full width of a rectangular path spread — so reading a
SAMMY .inp goes through nereids_endf::sammy::sammy_to_nereids_resolution
(Deltag/(2√ln2), Deltal/√6), never straight into these fields.
§Physics
For a time-of-flight instrument, the energy resolution is:
(ΔE/E)² = (2·Δt/t)² + (2·ΔL/L)²
where t = L/v is the neutron time-of-flight, Δt is the total timing width, and ΔL is the flight path width — both W-parameters, as above, so ΔE is one too. The factor 2 is the kinematic derivative dE/E = 2·dt/t; it is not a width-measure conversion. Since t ∝ 1/√E, the timing contribution gives ΔE ∝ E^(3/2) while the path contribution gives ΔE ∝ E.
The broadened cross-section is:
σ_res(E) = ∫ R(E, E’) · σ(E’) dE’
When Deltae = 0, R is a pure Gaussian (Iesopr=1): R(E, E’) = exp(-(E-E’)²/Wg²) / (Wg·√π)
When Deltae > 0, R is the convolution of a Gaussian with an exponential tail (Iesopr=3): R(E, E’) ∝ exp(2·C·A + C²) · erfc(C + A)
where C = Wg/(2·We), A = (E - E’)/Wg, Wg = Gaussian width, We = exponential width. This is the analytical result for convolving exp(-x²/Wg²) with exp(-x/We)·H(x).
Structs§
- Resolution
Matrix - Row-stochastic CSR representation of the resolution operator
Ron a fixed target energy grid. - Resolution
Params - Resolution function parameters for time-of-flight instruments.
- Resolution
Plan - Pre-built resolution-broadening plan for a specific target energy grid.
- Tabulated
Resolution - A tabulated resolution function from Monte Carlo instrument simulation.
Enums§
- Resolution
Error - Errors from resolution broadening operations.
- Resolution
Function - Resolution function: analytical Gaussian, tabulated from Monte Carlo, or analytical Ikeda–Carpenter moderator model.
- Resolution
Params Error - Errors from
ResolutionParamsconstruction. - Resolution
Parse Error - Errors from resolution file parsing.
Constants§
- TOF_
FACTOR - TOF conversion factor:
t (μs) = TOF_FACTOR × L (m) / √(E in eV).
Functions§
- apply_r
- Apply a compiled
ResolutionMatrixto a spectrum on the same target grid the matrix was compiled for. - apply_
resolution - Apply resolution broadening using either Gaussian or tabulated kernel.
- apply_
resolution_ with_ matrix - Checked variant of
apply_rthat validates the matrix was compiled forenergiesbefore applying. - apply_
resolution_ with_ plan - Apply resolution broadening, optionally via a pre-built
ResolutionPlan. - build_
resolution_ plan - Build a broadening plan for
(energies, resolution). - resolution_
broaden - Apply Gaussian resolution broadening to cross-section data.