pyspinw.polarisation#

Calculates polarised cross-sections from Sab matrix

Functions

calculate_polarised_intensity(Sab, Sperp, ...)

Calculates the polarised intensity for a given component string from the spin-spin correlation matrix

parse_components(components, rlu_to_cart)

Parses a polarised components string

Classes

PolarisationType(*values)

Types of Polarisation components

class pyspinw.polarisation.PolarisationType(*values)#

Bases: Enum

Types of Polarisation components

MXX = 'Mxx'#
MXY = 'Mxy'#
MXZ = 'Mxz'#
MYX = 'Myx'#
MYY = 'Myy'#
MYZ = 'Myz'#
MZX = 'Mzx'#
MZY = 'Mzy'#
MZZ = 'Mzz'#
PX = 'Px'#
PXX = 'Pxx'#
PXY = 'Pxy'#
PXZ = 'Pxz'#
PY = 'Py'#
PYX = 'Pyx'#
PYY = 'Pyy'#
PYZ = 'Pyz'#
PZ = 'Pz'#
PZX = 'Pzx'#
PZY = 'Pzy'#
PZZ = 'Pzz'#
pyspinw.polarisation.calculate_polarised_intensity(Sab: ArrayLike, Sperp: ArrayLike, q_vectors: ArrayLike, components: str, rlu_to_cart: ArrayLike)#

Calculates the polarised intensity for a given component string from the spin-spin correlation matrix

Parameters:
  • Sab – the spin-spin correlation matrices computed previously

  • q_vectors – a numpy array of the q-vectors corresponding to the set of Sab inputted

  • components – the component string which is a mathematical expression involving polarisation components Pab, Pa or Mab, and optionally the horizontal scattering plane defined after a comma. If not specified, we assume the a-b plane is horizontal.

Pab and Pa indicate the polarised neutron intensity in either full (Pab) or half (Pa) polarised modes. Here ab indicate the x, y, or z directions in the Blume-Maleev cartesian coordinate system where x is parallel to Q, y is perpendicular to Q in the horizontal plane and z is vertical. Mab will return the projection of the Sab matrix in the Blume-Maleev coordinate system.

The horizontal plane used to define the Blume-Maleev system can be specified after a comma in the component string, either as a perpendicular vector (in the XYZ coordinate system), or two Q-vector (in the lattice units system) defining the plane. Note that these vectors defining the plane should be delimited by square brackets, and components can be delimited by commas or spaces

Examples: ‘Pxy+0.33*Pyz, [0,1,0]’ # y direction is normal (does not necessarily correspond to b-axis)

‘Mxy, [1 1 0]-[0 0 1]’ # [110]-[001] is defined as horizontal plane, returns projected Sab ‘Px’ # a-b plane is horizontal (default), return half-polarised intensity

pyspinw.polarisation.parse_components(components: str, rlu_to_cart: ArrayLike)#

Parses a polarised components string

Parameters:

components – the component string which is a mathematical expression involving polarisation components Pab, Pa or Mab, and optionally the horizontal scattering plane defined after a comma. If not specified, we assume the a-b plane is horizontal.