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 arrives at t0_us + u plus a delay drawn from pulse, whose flight path sets u for each energy.
OpenBeamFit
The fitted open beam.

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 neutrons arriving in it, or every one 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.