ess.sans.beam_center_finder.beam_center_from_center_of_mass#

ess.sans.beam_center_finder.beam_center_from_center_of_mass(workflow)[source]#

Estimate the beam center via the center-of-mass of the data counts.

The center-of-mass is simply the weighted mean of the positions. Areas with low counts are excluded from the center of mass calculation, as they typically fall into asymmetric regions of the detector panel and would thus lead to a biased result. The beam is assumed to be roughly aligned with the Z axis. The returned beam center is the component normal to the beam direction, projected onto the X-Y plane.

Parameters:

workflow (Pipeline) – The reduction workflow to compute MaskedData[SampleRun].

Returns:

types.BeamCenter (scipp.Variable) – The beam center position as a vector.