Visualisation of musculotendon curves after appending parameters

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Nicos Haralabidis
Posts: 196
Joined: Tue Aug 16, 2016 1:46 am

Visualisation of musculotendon curves after appending parameters

Post by Nicos Haralabidis » Fri Jun 22, 2018 4:25 am

Dear users,

I am wondering whether it is possible to plot the musculotendon curves in the GUI (as done here: https://simtk-confluence.stanford.edu/d ... don+Curves) and whether it is then possible to inspect these curves following any modifications to their underlying parameters?

Kind regards,

Nicos Haralabidis

Tags:

User avatar
Thomas Uchida
Posts: 1793
Joined: Wed May 16, 2012 11:40 am

Re: Visualisation of musculotendon curves after appending parameters

Post by Thomas Uchida » Fri Jun 22, 2018 8:39 am

You can use the printMuscleCurveToCSVFile() methods and plot in Excel or MATLAB. See, for example, https://simtk.org/api_docs/opensim/api_ ... 338abc6da9.

User avatar
Nicos Haralabidis
Posts: 196
Joined: Tue Aug 16, 2016 1:46 am

Re: Visualisation of musculotendon curves after appending parameters

Post by Nicos Haralabidis » Fri Jun 22, 2018 11:34 am

Thanks for the prompt reply Tom.

I have had a chance to look at the source you provided. I am attempting to access the class through the Matlab API.

Do I need to down cast the properties of a particular muscle, e.g. glut_med1_r, by implementing:
ActiveForceLengthCurve.safeDownCast(osimModel.getMuscles().get(0))

Then followed by ActiveForceLength.printMuscleCurveToCSVFile() ?

Kind regards,

Nicos Haralabidis

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: Visualisation of musculotendon curves after appending parameters

Post by jimmy d » Fri Jun 22, 2018 2:36 pm

The ActiveForceLengthCurve() class is only a method for the Millard2012 type muscles;
https://simtk.org/api_docs/opensim/api_ ... uscle.html

User avatar
Nicos Haralabidis
Posts: 196
Joined: Tue Aug 16, 2016 1:46 am

Re: Visualisation of musculotendon curves after appending parameters

Post by Nicos Haralabidis » Sat Jun 23, 2018 12:36 am

Good morning James,

Thanks for your reply! I have managed to successfully implement the method.

For anyone else interested in visualising the musculotendon curves this is the rough code I used for Matlab:

import org.opensim.modeling.*

osimModel = Model('LaiArnold2017_refined_arms.osim');
model_muscles = osimModel.getMuscles();
muscle = model_muscles.get(0);
muscle_millard = Millard2012EquilibriumMuscle.safeDownCast(muscle);

muscle_millard.getActiveForceLengthCurve().printMuscleCurveToCSVFile('folder/folder');

The same can be done for the ForceVelocityCurve, FiberForceLengthCurve and TendonForceLengthCurve.

Nicos

POST REPLY