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)andcoef[l][l+m]holds theDcomponents for degreeland orderm(D=3for 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)forD=3).