Comparison the EMG to simulation

Hello,

Recently I’m using the C3D file to simulate the gait of a patient, I want to validate the AnyBody model by comparing the aEMG to MusActivity. Does AnyBody have the script which could compare them automatically?

Any help would be appreciated!

Thank you!

@Nickel_Lee I do have something which I once used for a paper (lund et al 2014) when I was at the University for comparing EMG with activity.

The EMG I had was stored in the c3d file as analog data, so if you EMG is not in the C3D file you will need to modify the script. It is a class template called CreateEmgEnvelope(), and here is file ValidationOutput.any where it was used.

Hello,

Thank you for your response. I’ll try to do it later. Very appreciated for your help.

Thank you again!

BW
Lee

Hello,

I tried to run the file you uploaded 5 years ago about the scalingRBF.
Seems like the code has changed.

ERROR(SCR.SCN6) : H:/LEE/Body/A…n/T…k/StandardParameters.any(4) : ‘BM_LEG_LEFT’ : Unexpected character.

How should I change the code to run it.

Any help would be appreciated!

BW,
Lee

The easiest way to fix this is to use the matching Model Repository for that version. I think it used AMMR 1.6.

Old AMMR versions are available on Zenodo.org

But I should probably fix the model to run with the newest version of the Model repository. But I don’t have much free time for doing that.

I think some researchers at Aalborg University (@msan00) may have and use a version of the model which has been updated.

Hello,
Thanks for your response.

I was wondering is it a good move that I first scaled the model based on the height and mass and then I used the morphing tech in tutorials for the detailed thigh and shank segment?
pgalibarov said the source femur should be the non-scaled femur, I want to know more about the process of scaling.

  1. Does the genetic bone differ between new AMMR 2.1 and order version like AMMR1.6?

  2. And I used your shared file “EmgProcessing.any”, “ReduceKneeStrength.any”, I put the “ReduceKneeStrength.any” in the model/right/leg and “EmgProcessing.any” in studies. Here came a errror:
    ERROR(SCR.PRS28) : H:/Su…M/A…n/M…s/DM/S…p/EmgProcessing.any(1) : ‘#class_template’ : Class template definition is not allowed inside Main.

Was I put it in the wrong place or what?

Any help would be appreciated!
Thank you!

Best Wishes,
Lee

I am not the right person to answer the scaling/morphing question. Sorry.

All files that the define class templates e.g. has the #class_template statement must be included before the first appearance of Main = {.You can, of course, use the template after the main statement :slight_smile:

Hi Lee,

All you need to do is load a model with no scaling activated. Double click on the bone of interest and then right click in the model tree ‘export stl’ in local coordinate system to make sure you have this generic ‘source bone’.

I began answering the same question you asked here: Personalize model based on CT data

Best Regards,
Christine

Hello,

I put it before the Main, Problem solved.

Thanks.
Best Regards,
Lee

Hello,

Could you simply explain the workflow of scaling if plug-in-gait-simple model of subject with different height and mass?
What I want to do is first scaling the whole model based on the height and mass and the Height ratio, Then scaling the femur and tibia using RBF scaling (using the first step femur STL as source and my own femur STL as target).

Thanks,
Best Wishes,
Lee

Hi Lee,

Let continue the conversation on scaling/STLs in this thread please.

https://forum.anyscript.org/t/personalize-model-based-on-ct-data/5044/8?u=cdzialo

Best Regards,
Christine

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.