spharm#

ktch.harmonic.spharm(l_max: int, coef: list[TypeAliasForwardRef('npt.ArrayLike')], theta_range=None, phi_range=None)[source]#

Reconstruct surface coordinates from SPHARM coefficients.

Parameters:
l_maxint

Maximum degree of spherical harmonics.

coeflist of array-like

Real SPHARM coefficients. coef[l] has shape (2*l+1, D) and coef[l][l+m] holds the D components for degree l and order m (D=3 for 3D Cartesian surfaces).

theta_rangearray-like of shape (n_theta,), optional

Polar angle values (colatitude, 0 to pi). Defaults to np.linspace(0, pi, 90).

phi_rangearray-like of shape (n_phi,), optional

Azimuthal angle values (0 to 2*pi). Defaults to np.linspace(0, 2*pi, 180).

Returns:
tuple of ndarray of shape (n_theta, n_phi)

Reconstructed coordinates. The tuple length equals the codomain dimension D (e.g. (x, y, z) for D=3).