Export .csv file with kinematic data for CMJs

New project for OpenCap, which is a new software package to estimate 3D human movement dynamics from smartphone videos. OpenCap strongly relies on OpenSim.
POST REPLY
User avatar
Tobias Kammel
Posts: 3
Joined: Thu Apr 18, 2024 3:49 am

Export .csv file with kinematic data for CMJs

Post by Tobias Kammel » Sun May 05, 2024 2:58 am

Hi there,

I would like to analyze the joint angles measured with OpenCap during countermovement jumps.
For this I need the kinematic data of all jumps as a .csv file. I tried to use your python scripts that you referenced on p. 9 at the top of your FAQ document. Although I have followed all the steps in the instructions at the link bellow, I have unfortunately not been able to get the Python scripts to run.

https://github.com/stanfordnmbl/opencap ... mple.ipynb

Is it possible that I send you my .mot files and you export the .csv files for me?


Best regards
Tobias

Tags:

User avatar
Antoine Falisse
Posts: 439
Joined: Wed Jan 07, 2015 2:21 am

Re: Export .csv file with kinematic data for CMJs

Post by Antoine Falisse » Tue May 07, 2024 11:14 am

Hey,

If you download the data from the web application, you have all the .mot files in the downloaded folder.
We cannot do it for you, but we can help you get the script to work. Could you describe the errors you are receiving?

Thanks,
Antoine

User avatar
Tobias Kammel
Posts: 3
Joined: Thu Apr 18, 2024 3:49 am

Re: Export .csv file with kinematic data for CMJs

Post by Tobias Kammel » Wed May 15, 2024 7:33 am

Hey,

thanks for your answer!
In the meantime I managed to get the python scripts to run. I adapted the code from your example.py file to export the .csv file for each jump. In this way python downloads the data for each trial from the opencap website which takes a lot of time.

Is it possible to adapt the code so that python uses the files from my computer? (Maybe there already exists a code.) I already downloaded all data from the OpenCap website. For each session the is a folder which contains the subfolders 'CalibrationImages', 'MarkerData', 'OpenSimData' and 'Videos'.
It would be great if python generated all .csv files for the 13 sessions with 8 trials each in one run.

Best regards
Tobias

User avatar
Matt Petrucci
Posts: 184
Joined: Fri Feb 24, 2012 11:49 am

Re: Export .csv file with kinematic data for CMJs

Post by Matt Petrucci » Thu May 16, 2024 3:16 pm

Hi Tobias,

If you have the python code running, you can specify the path to the data you already have on your computer here: https://github.com/stanfordnmbl/opencap ... ple.py#L34 and skip the download step in line 37.

Another way to consider...although its not a direct export, the .mot files for each trial are simply tab delimited files (instead of comma separated files). So you can open them in Excel by using File -> Import and specify it is tab delimited. You can then save as a .csv if you wish.

User avatar
Tobias Kammel
Posts: 3
Joined: Thu Apr 18, 2024 3:49 am

Re: Export .csv file with kinematic data for CMJs

Post by Tobias Kammel » Tue May 28, 2024 9:32 am

Hi Matt,

it actually worked completely without python. I only had to open the .mot files in Excel and then I got the joint angles directly. It was much easier that way!

Thanks a lot!
Tobias

User avatar
Antoine Falisse
Posts: 439
Joined: Wed Jan 07, 2015 2:21 am

Re: Export .csv file with kinematic data for CMJs

Post by Antoine Falisse » Tue May 28, 2024 9:51 am

great

User avatar
世宣 黃
Posts: 7
Joined: Tue May 14, 2024 12:20 am

Re: Export .csv file with kinematic data for CMJs

Post by 世宣 黃 » Tue Aug 27, 2024 6:09 am

Hello,

I would like to ask how you can export the .mot file in the opensim software to a computer folder and then open it in excel?

Thanks

User avatar
Matt Petrucci
Posts: 184
Joined: Fri Feb 24, 2012 11:49 am

Re: Export .csv file with kinematic data for CMJs

Post by Matt Petrucci » Tue Aug 27, 2024 12:37 pm

Hello, you should be able to open the .mot in Excel as a tab delimited file. File -> Import and specify it is tab delimited. You can then save as a .csv if you wish.

User avatar
世宣 黃
Posts: 7
Joined: Tue May 14, 2024 12:20 am

Re: Export .csv file with kinematic data for CMJs

Post by 世宣 黃 » Thu Aug 29, 2024 9:25 am

Hello,

But what method do I need to use to convert the opensim human body module into a .mot file?

Thanks

User avatar
Matt Petrucci
Posts: 184
Joined: Fri Feb 24, 2012 11:49 am

Re: Export .csv file with kinematic data for CMJs

Post by Matt Petrucci » Thu Aug 29, 2024 12:29 pm

Hello, you can either download the session from the webapp (click download data in the bottom left corner after expanding the menu) or use python scripting. In the session folder, you will find the .mot file in the OpenSimData -> Kinematics folder.

Hope this helps,

POST REPLY