Skip to main content

Module open_beam

Module open_beam 

Source
Expand description

The beam, in neutrons per µs of flight time, fitted to the open-beam counts it produces through the instrument pulse.

Structs§

Calibration
A neutron of flight time u over the flight path flight_path_m (m) arrives at t0_us + u (µs) plus a delay drawn from pulse. fit_counts fits t0_us, flight_path_m and the pulse’s numbers unless they are known; fit_open_beam uses their starting values.
OpenBeamFit
The fitted open beam.
Pulse
The Ikeda–Carpenter pulse with α = α₀√E + α₁ and β = β₀√E + β₁ in 1/µs, E in eV, a storage fraction R over energy_span_ev, or linear in √E from R at its low end to R_high at its high end, the proton pulse’s triangle of FWHM h in µs, given by h², in which the counts are smooth down to h = 0, and an optional detector tail. α and β must be at least 1e-9 µs⁻¹ across the span, β even where the storage fraction is 0.

Constants§

BOUND
Largest Σ_k (μ_fine − μ_coarse)² / μ_fine, over bins predicted non-empty, by which halving the grid may change the predicted counts for the finer grid to be accepted.

Functions§

fit_open_beam
Fit the beam to the raw open-beam counts open_counts of the time bins time_edges_us (µs), each bin recording the fraction open_live of the counts arriving in it, or every one when that is None. known gives, per bin, the counts that arrive without the beam, before the live fraction, or none when that is None. ln φ, the logarithm of the beam, is a cubic spline in ln u with knots from the first edge’s flight time to the last edge’s; outside them the beam is the spline’s continuation, which reaches the bins only through the pulse’s delay or, for a folded pulse, its early tail. Neutrons faster than the grid’s range, each reaching the bins with less than NEGLIGIBLE_ARRIVAL_PROBABILITY chance, are left out.