Skip to content

Conversation

@ErwanBeurienne
Copy link
Contributor

This PR extends the utility function bodykin_from_mot_osim_func() to return pandas DataFrames for both body kinematics (loc_rot_frame_all_df) and CoM data (CoM_df), improving usability for downstream analysis. The function now returns an structured DataFrames in addition of raw NumPy arrays.

Key changes:

  • Returns loc_rot_frame_all_df for body kinematics.
  • Returns CoM_df (time, position, velocity) when calculate_com_vel=True.
  • Maintains optional CSV output for CoM data.

The function now returns pandas DataFrames for body kinematics and CoM data.
@davidpagnon
Copy link
Collaborator

Hi,

This would not return the same number of arguments as the original function, and would break some other people's scripts. Can you make it so that this is changed only if you invoke a certain argument?
Also, I am not sure what the difference is between loc_rot_frame_all_df, CoM_df, and com_data.

I feel like it would be better if you made the output you want from outside this script, so that it is not changed for other users (unless you think something is really lacking). What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants