ess.sans.conversions.sans_elastic#

ess.sans.conversions.sans_elastic(correct_for_gravity, *, sample_position, source_position, gravity)[source]#

Generate a coordinate transformation graph for SANS elastic scattering.

It is based on classical conversions from tof and pixel position to \(\lambda\) (wavelength), \(\theta\) (theta) and \(Q\) (Q), but can take into account the Earth’s gravitational field, which bends the flight path of the neutrons, to compute the scattering angle \(\theta\).

The angle can be found using the following expression (Seeger & Hjelm 1991):

\[\theta = \frac{1}{2}\sin^{-1}\left(\frac{\sqrt{ x^{2} + \left( y + \frac{g m_{\rm n}}{2 h^{2}} \lambda^{2} L_{2}^{2} \right)^{2} } }{L_{2}}\right)\]

where \(x\) and \(y\) are the spatial coordinates of the pixels in the horizontal and vertical directions, respectively, \(m_{\rm n}\) is the neutron mass, \(L_{2}\) is the distance between the sample and a detector pixel, \(g\) is the acceleration due to gravity, and \(h\) is Planck’s constant.

By default, the effects of gravity on the neutron flight paths are not included (equivalent to \(g = 0\) in the expression above).

Parameters:
  • correct_for_gravity (types.CorrectForGravity (bool)) – Take into account the bending of the neutron flight paths from the Earth’s gravitational field if True.

  • gravity (ess.reduce.nexus.types.GravityVector (scipp.Variable)) – A vector indicating the strength and direction of gravity. Required even if correct_for_gravity is False.

  • sample_position (Position[NXsample, TypeVar(RunType)]) – Position of the sample as a vector.

  • source_position (Position[NXsource, TypeVar(RunType)]) – Position of the source as a vector.

Return type:

ElasticCoordTransformGraph[TypeVar(RunType)]