paramagpy.fit.pcs_gradient_orthogonality_cross

paramagpy.fit.pcs_gradient_orthogonality_cross(metals, position)[source]

An experimental metric for calculating the likelihood of a particular nuclear position being well localised from multiple tensors. The metric scores the orthogonality of the PCS gradient vectors and accounts for their magnitude. This algorithm calculates the PCS graident vector arising at a given position from each tensor provided. It then calculates the pairwise cross product of each vector and averages their norm (length).

Parameters
  • metals (list of Metal objects) – a list of paramagpy metal objects which define the tensors.

  • position (numpy.ndarray of floats) – the [x,y,z] coordinate to calculated the orthogonality score

Returns

score – the orthogonality score. This is necessarily between greater than zero. A larger score defines a more favourable orthogonality between PCS gradient vectors and also score larger PCS gradients more highly.

Return type

float