read_spharmpdm_coef#
- ktch.io.read_spharmpdm_coef(path: str | Path) SpharmPdmData[source]#
Read .coef file of SPHARM-PDM.
The .coef file is an output of the ParaToSPHARMMesh step of SPHARM-PDM, and contains SPHARM coefficients.
The file format consists of: - First value: total number of coefficients (3*(lmax+1)^2) - Remaining values: real and imaginary parts of coefficients
arranged in SPHARM-PDM’s specific order
- Parameters:
- pathstr or pathlib.Path
Path to the .coef file.
- Returns:
- dataSpharmPdmData
SPHARM-PDM coefficient data.
- Raises:
- FileNotFoundError
If the file does not exist.
- ValueError
If the file format is invalid or coefficients are malformed.