ess.sans.beam_center_finder.beam_center_from_center_of_mass_alternative#
- ess.sans.beam_center_finder.beam_center_from_center_of_mass_alternative(workflow, beam_stop_radius=None, beam_stop_arm_width=None)[source]#
Estimate the beam center via the center-of-mass of the data counts.
We are assuming the intensity distribution is symmetric around the beam center. Even if the intensity distribution is symmetric around the beam center the intensity distribution in the detector might not be, because
the detector has a finite extent,
and there is a beam stop covering part of the detector.
To deal with the limited size of the detector a mask can be applied that is small enough so that the the remaining intensity is entirely inside the detector. To deal with the beam stop we can mask the region of the detector that the beam stop covers.
But to preserve the symmetry of the intensity around the beam center the masks also need to be symmetical around the beam center. The problem is, the beam center is unknown. However, if the beam center was known to us, and we applied symmetrical masks that covered the regions of the detector where the intensity distribution is asymmetrical, then the center of mass of the remaining intensity would equal the beam center. Conversely, if we apply symmetrical masks around a point that is not the beam center the center of mass of the remaining intensity will (likely) not equal the original point. This suggests the beam center can be found using a fixed point iteration where each iteration we
Compute the center of mass of the remaining intensity and assign it to be our current estimate of the beam center.
Create symmetrical masks around the current estimate of the beam center.
Repeat from 1. until convergence.
- Parameters:
workflow – The reduction workflow to compute CorrectedDetector[SampleRun, Numerator].
- Returns:
types.BeamCenter(scipp.Variable) – The beam center position as a vector.