Export .csv file with kinematic data for CMJs
- Tobias Kammel
- Posts: 3
- Joined: Thu Apr 18, 2024 3:49 am
Export .csv file with kinematic data for CMJs
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
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:
- Antoine Falisse
- Posts: 438
- Joined: Wed Jan 07, 2015 2:21 am
Re: Export .csv file with kinematic data for CMJs
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
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
- Tobias Kammel
- Posts: 3
- Joined: Thu Apr 18, 2024 3:49 am
Re: Export .csv file with kinematic data for CMJs
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
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
- Matt Petrucci
- Posts: 166
- Joined: Fri Feb 24, 2012 11:49 am
Re: Export .csv file with kinematic data for CMJs
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.
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.
- Tobias Kammel
- Posts: 3
- Joined: Thu Apr 18, 2024 3:49 am
Re: Export .csv file with kinematic data for CMJs
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
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
- Antoine Falisse
- Posts: 438
- Joined: Wed Jan 07, 2015 2:21 am
Re: Export .csv file with kinematic data for CMJs
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
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
- Matt Petrucci
- Posts: 166
- Joined: Fri Feb 24, 2012 11:49 am
Re: Export .csv file with kinematic data for CMJs
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.
Re: Export .csv file with kinematic data for CMJs
Hello,
But what method do I need to use to convert the opensim human body module into a .mot file?
Thanks
But what method do I need to use to convert the opensim human body module into a .mot file?
Thanks
- Matt Petrucci
- Posts: 166
- Joined: Fri Feb 24, 2012 11:49 am
Re: Export .csv file with kinematic data for CMJs
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,
Hope this helps,