Page 1 of 1

Where to find KAM data

Posted: Wed Feb 21, 2024 11:33 am
by befaer23
Dear OpenCap Team,

I am currently using the example_kinetics.py script you provide on GitHub to run dynamic simulations on a set of data I collected.

The script is executing flawlessly so far and during the final stages of the code "Computing knee adduction moments" is displayed in the console.

For one trial so far I have found a .sto file "inverse_dynamics" in my results folder which included data for knee adduction moments.
However for all other trials this .sto file is lacking and the "kinetics_trialname" .MOT file does not contain data on knee adduction moments.

What could be the cause for this? I have checked all possible directories on my drive to make sure I did not overlook the desired .sto file.

I have attached screenshots of the console output and the current content of my results folder.

Thank you in advance for your support.

Best

Bernhard

Re: Where to find KAM data

Posted: Thu Feb 22, 2024 10:27 am
by antoinefalisse
Hey,

The KAM results are saved in the optimaltrajectories.npy file.

Best,
Antoine

Re: Where to find KAM data

Posted: Fri Feb 23, 2024 9:07 am
by befaer23
Hi Antoine,

thanks for your swift reply.

I am having some trouble when trying to access the data stored in that .npy file.
I'm currently working in spyder IDE an when trying open up the loaded data I get an error "object arrays without shape are not supported".
I can print the contents of the loaded .npy file, but I haven't been able to extract any data of interest to me so far.

Can you share some insights as to how you have you been working with these files?

Best

Bernhard

Re: Where to find KAM data

Posted: Fri Feb 23, 2024 9:29 am
by antoinefalisse
Hi, this should help: https://github.com/stanfordnmbl/opencap ... D.py#L1854
Best, Antoine

Re: Where to find KAM data

Posted: Sun Feb 25, 2024 4:33 am
by befaer23
Hi, that's exactly what I was searching for. Thank you!

I have selected the time_window for each trial based on force plate data from a marker-based system I used simultaneously alongside OpenCap (I aligned the data from both systems prior to this).
These time windowa are ~600ms long for most trials I simulated so far.

When inspecting the kinetic & GRF data, the files contain only ~60 lines of data, which makes we wonder:
Which frequency is the simulated kinetic & GRF data "sampled"/simulated at?

Thanks in advance.

Best
Bernhard

Re: Where to find KAM data

Posted: Mon Feb 26, 2024 9:33 am
by antoinefalisse
Hey, take a look at this post: viewtopicPhpbb.php?f=2385&t=17595&p=0&s ... 6803f19f65

Antoine