spharm#
- ktch.harmonic.spharm(l_max: int, coef: list[TypeAliasForwardRef('npt.ArrayLike')], theta_range=None, phi_range=None, threshold_imag_parts: float = 1e-10)[source]#
Reconstruct surface coordinates from SPHARM coefficients.
- Parameters:
- l_maxint
Maximum degree of spherical harmonics.
- coeflist of array-like
SPHARM coefficients.
coef[l]has shape(2*l+1, 3)andcoef[l][l+m]holds(c_x, c_y, c_z)for degreeland orderm.- 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).- threshold_imag_partsfloat, default=1e-10
Tolerance for imaginary parts in the reconstructed coordinates. A warning is issued if the total imaginary magnitude exceeds this value.
- Returns:
- x, y, zndarray of shape (n_theta, n_phi)
Reconstructed surface coordinates.