spharmpdm_to_sha_coeffs#

ktch.io.spharmpdm_to_sha_coeffs(spharmpdm_data)[source]#

Convert SpharmPdmData to SHA-compatible flat coefficient vectors.

The output contains real-valued coefficients with respect to the standard orthonormal real spherical harmonic basis used by SphericalHarmonicAnalysis.

Parameters:
spharmpdm_dataSpharmPdmData or list of SpharmPdmData

SPHARM-PDM data read by read_spharmpdm_coef().

Returns:
coeffsnp.ndarray of shape (n_samples, 3 * (l_max + 1)**2), float64

Flat coefficient vectors compatible with inverse_transform(). Layout: [cx_0_0, cx_1_-1, ..., cy_0_0, ..., cz_0_0, ...] (axis-major, then by degree and order).