read_nef#

ktch.io.read_nef(file_path, as_frame=False)[source]#

Read normalized EFD (.nef) file.

The .nef format stores normalized elliptic Fourier coefficients produced by SHAPE’s Chc2Nef program:

#CONST [a1_const] [b1_const] [c1_const] [d1_const]
#HARMO [n_harmonics]
[Sample name]
  [a1] [b1] [c1] [d1]
  [a2] [b2] [c2] [d2]
  ...
Parameters:
file_pathstr or Path

Path to the .nef file.

as_framebool, default=False

If True, return a DataFrame.

Returns:
resultNefData or list of NefData or pd.DataFrame

If a single record and as_frame=False, returns a NefData. If multiple records and as_frame=False, returns a list of NefData. If as_frame=True, returns a concatenated DataFrame.