Page 1 of 1

Export .csv file with kinematic data for CMJs

Posted: Sun May 05, 2024 2:58 am
by tobias.kammel
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

Re: Export .csv file with kinematic data for CMJs

Posted: Tue May 07, 2024 11:14 am
by antoinefalisse
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

Re: Export .csv file with kinematic data for CMJs

Posted: Wed May 15, 2024 7:33 am
by tobias.kammel
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

Re: Export .csv file with kinematic data for CMJs

Posted: Thu May 16, 2024 3:16 pm
by mpetrucc
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.

Re: Export .csv file with kinematic data for CMJs

Posted: Tue May 28, 2024 9:32 am
by tobias.kammel
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

Re: Export .csv file with kinematic data for CMJs

Posted: Tue May 28, 2024 9:51 am
by antoinefalisse
great