disk_harm#

ktch.harmonic.disk_harm(n_max: int, coef: list[npt.ArrayLike], r_range: npt.NDArray[np.float64] | None = None, theta_range: npt.NDArray[np.float64] | None = None) tuple[npt.NDArray[np.float64], ...][source]#

Reconstruct coordinates from disk harmonic coefficients.

The number of output arrays is determined by the trailing dimension of the coefficient arrays (2 for planar, 3 for surface mappings).

Parameters:
n_maxint

Maximum degree of disk harmonics to use. Can be less than the degree used for estimation (truncated reconstruction).

coeflist of array-like

Disk harmonic coefficients. coef[n] has shape (2*n+1, n_dim) and coef[n][n+m] holds the coefficients for degree n and order m.

r_rangearray-like of shape (n_r,), optional

Radial coordinates for the reconstruction grid. Defaults to np.linspace(0, 1, 100).

theta_rangearray-like of shape (n_theta,), optional

Angular coordinates for the reconstruction grid. Defaults to np.linspace(0, 2*pi, 180).

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

Reconstructed coordinates. Length equals n_dim (e.g., (x, y) for 2D or (x, y, z) for 3D).