Skip to main content

Module resolution

Module resolution 

Source
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 function
  • convolution/DopplerAndResolutionBroadener.cpp — Xcoef quadrature weights
  • Manual Section III.C (Resolution Broadening); quadrature Eq. IV B 3.8 (R3-revision numbering — see compute_xcoef_weights and the Gaussian+exponential path in resolution_broaden_presorted)

§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 uncertainty, and ΔL is the flight path uncertainty. 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§

ResolutionMatrix
Row-stochastic CSR representation of the resolution operator R on a fixed target energy grid.
ResolutionParams
Resolution function parameters for time-of-flight instruments.
ResolutionPlan
Pre-built resolution-broadening plan for a specific target energy grid.
TabulatedResolution
A tabulated resolution function from Monte Carlo instrument simulation.

Enums§

ResolutionError
Errors from resolution broadening operations.
ResolutionFunction
Resolution function: either analytical Gaussian or tabulated from Monte Carlo.
ResolutionParamsError
Errors from ResolutionParams construction.
ResolutionParseError
Errors from resolution file parsing.

Functions§

apply_r
Apply a compiled ResolutionMatrix to 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_r that validates the matrix was compiled for energies before 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.