ess.bifrost.normalization.normalize_by_monitor_and_proton_charge#

ess.bifrost.normalization.normalize_by_monitor_and_proton_charge(detector, monitor, proton_charge, uncertainty_broadcast_mode)[source]#

Normalize detector data by a monitor and proton charge.

This function divides the detector event weights by the distribution of the monitor in incident wavelength and by the proton charge. The former accounts for the wavelength-dependent transmission of the beam through the primary spectrometer. The latter accounts for the measurement time and source strength.

The detector is normalized according to

\[d_e^\text{Norm} = d_e \frac{\Delta x_i}{m_i \sum_j m_j} \frac1{C}\]

where \(d_e\) is a detector event, \(m_i\) is the monitor bin containing the incident wavelength of that detector event, and \(\Delta x_i\) is the bin width of that bin. Finally, \(C\) is the proton charge. The monitor term is chosen to have unit integral and represent a probability density of incident neutrons.

Parameters:
  • detector (IncidentEnergyDetector[TypeVar(RunType, ess.reduce.nexus.types.SampleRun (int), ess.reduce.nexus.types.VanadiumRun (int))]) – Detector events to normalize.

  • monitor (WavelengthMonitor[TypeVar(RunType, ess.reduce.nexus.types.SampleRun (int), ess.reduce.nexus.types.VanadiumRun (int)), ess.reduce.nexus.types.FrameMonitor3 (int)]) – Monitor histogram.

  • proton_charge (ProtonCharge[TypeVar(RunType, ess.reduce.nexus.types.SampleRun (int), ess.reduce.nexus.types.VanadiumRun (int))]) – Accumulated proton charge. Scalar or per setting (a3 / a4).

  • uncertainty_broadcast_mode (UncertaintyBroadcastMode) – Choose how uncertainties of the monitor and proton charge are broadcast to the sample data.

Returns:

NormalizedIncidentEnergyDetector[TypeVar(RunType, ess.reduce.nexus.types.SampleRun (int), ess.reduce.nexus.types.VanadiumRun (int))] – The detector events normalized by the monitor and proton charge.