spherical_harmonics#

mrinufft.trajectories.spherical_harmonics(positions: NDArray, n_terms: int = 16) → NDArray[source]#

Evaluate the spherical harmonics of the GIRF terms.

The terms follow the order and the unnormalized polynomials of the Skope field cameras: (1, x, y, z, xy, zy, 3z^2 - r^2, xz, x^2 - y^2, ...), up to the third order. See Gradient Impulse Response Function (GIRF) for the full list.

Parameters:
  • positions (NDArray) – Positions in m, with shape (..., 3), or (..., 2) for z = 0.

  • n_terms (int, optional) – Number of terms, up to 16. The default is 16.

Returns:

Spherical harmonics, with shape (..., n_terms).

Return type:

NDArray

Example using spherical_harmonics:#

GIRF-based correction of the encoding

GIRF-based correction of the encoding