convert_coords_df_to_list#

ktch.io.convert_coords_df_to_list(df_coords: DataFrame) list[ndarray][source]#

Convert a coordinate DataFrame to a list of per-specimen arrays.

Bridges the DataFrame output of read_tps(as_frame=True)() or read_chc(as_frame=True)() to the list format expected by EllipticFourierAnalysis.

Parameters:
df_coordspd.DataFrame

DataFrame with MultiIndex (specimen_id, coord_id) and columns (x, y [, z]).

Returns:
coords_listlist of np.ndarray

Each element has shape (n_coords_i, n_dim).