pyCGM_Single.pycgmStatic.staticCalculation

pyCGM_Single.pycgmStatic.staticCalculation(frame, ankle_JC, knee_JC, flat_foot, vsk=None)

Calculate the Static angle function

Takes in anatomically uncorrected axis and anatomically correct axis. Corrects the axis depending on flat-footedness.

Calculates the offset angle between those two axes.

It is rotated from uncorrected axis in YXZ order.

Parameters
framedict

Dictionary of marker lists.

ankle_JCarray

An array containing the x,y,z axes marker positions of the ankle joint center.

knee_JCarray

An array containing the x,y,z axes marker positions of the knee joint center.

flat_footboolean

A boolean indicating if the feet are flat or not.

vskdict, optional

A dictionary containing subject measurements from a VSK file.

Returns
anglelist

Returns the offset angle represented by a 2x3x3 list. The array contains the right flexion, abduction, rotation angles (1x3x3) followed by the left flexion, abduction, rotation angles (1x3x3).

Notes

The correct axis changes depending on the flat foot option.

Examples

>>> import numpy as np
>>> from .pycgmStatic import staticCalculation
>>> frame = {'RTOE': np.array([427.95, 437.1,  41.77]),
...          'LTOE': np.array([175.79, 379.5,  42.61]),
...          'RHEE': np.array([406.46, 227.56,  48.76]),
...          'LHEE': np.array([223.6, 173.43,  47.93])}
>>> ankle_JC = [np.array([393.76, 247.68, 87.74]),
...            np.array([98.75, 219.47, 80.63]),
...            [[np.array([394.48, 248.37, 87.72]),
...            np.array([393.07, 248.39, 87.62]),
...            np.array([393.69, 247.78, 88.73])],
...            [np.array([98.47, 220.43, 80.53]),
...            np.array([97.79, 219.21, 80.76]),
...            np.array([98.85, 219.60, 81.62])]]]
>>> knee_JC = [np.array([364.18, 292.17, 515.19]),
...           np.array([143.55, 279.90, 524.78]),
...           np.array([[[364.65, 293.07, 515.19],
...           [363.29, 292.61, 515.04],
...           [364.05, 292.24, 516.18]],
...           [[143.66, 280.89, 524.63],
...           [142.56, 280.02, 524.86],
...           [143.65, 280.05, 525.77]]])]
>>> flat_foot = True
>>> vsk = { 'RightSoleDelta': 0.45,'LeftSoleDelta': 0.45 }
>>> np.around(staticCalculation(frame,ankle_JC,knee_JC,flat_foot,vsk), 2)
array([[-0.08,  0.23, -0.66],
       [-0.67,  0.22, -0.3 ]])
>>> flat_foot = False # Using the same variables and switching the flat_foot flag.
>>> np.around(staticCalculation(frame,ankle_JC,knee_JC,flat_foot,vsk), 2)
array([[-0.08,  0.2 , -0.15],
       [-0.67,  0.19,  0.12]])