write_nef#

ktch.io.write_nef(file_path, coeffs, sample_names=None, const_flags=None)[source]#

Write normalized EFD coefficients to a .nef file.

Parameters:
file_pathstr or Path

Path to the output .nef file.

coeffsnp.ndarray or list of np.ndarray

Coefficient matrices with shape (n_harmonics, 4) each. A single 2-D array is treated as one record.

sample_namesstr or list of str, optional

Sample names. Defaults to "Sample".

const_flagstuple of int, optional

Four flags for the #CONST header. Defaults to (1, 1, 1, 0).