magtomo.Reconstruction.tensor_gradient#

tensor_gradient(tf, rot, difference, pol, order)#

Calculates the tensor gradient for a specific orientation.

Parameters:
tfnp.ndarray

The current guess for the tensor field.

rotnp.ndarray

The rotation matrix describing the sample rotation

differencenp.ndarray

The difference between the projection from vf and the input.

polnp.ndarray

The polarization at which the projection was measured.

orderint

The interpolation order for performing rotations.

Returns:
np.ndarray

The gradient for this combination of inputs.