pyCGM_Single.pycgmStatic.ankleJointCenter

pyCGM_Single.pycgmStatic.ankleJointCenter(frame, knee_JC, delta, vsk=None)

Calculate the ankle joint center and axis function.

Takes in a dictionary of xyz positions and marker names, an index and the knee axis. Calculates the ankle joint axis and returns the ankle origin and axis.

Markers used: tib_R, tib_L, ank_R, ank_L, knee_JC Subject Measurement values used: RightKneeWidth, LeftKneeWidth

Ankle Axis: Computed using Ankle Axis Calculation(ref. Clinical Gait Analysis hand book, Baker2013).

Parameters
framedict

Dictionary of marker lists.

knee_JCarray

An array of knee_JC each x,y,z position.

deltafloat

The length from marker to joint center, retrieved from subject measurement file.

vskdict, optional

A dictionary containing subject measurements from a VSK file.

Returns
R, L, axislist

Returns a list that contains the ankle axis origin in 1x3 arrays of xyz values and a 3x2x3 list composed of the ankle origin, x, y, and z axis components. The xyz axis components are 2x3 lists consisting of the origin in the first dimension and the direction of the axis in the second dimension.

Examples

>>> import numpy as np
>>> from .pycgmStatic import ankleJointCenter
>>> vsk = { 'RightAnkleWidth' : 70.0, 'LeftAnkleWidth' : 70.0,
...         'RightTibialTorsion': 0.0, 'LeftTibialTorsion' : 0.0}
>>> frame = { 'RTIB': np.array([433.98, 211.93, 273.30]),
...           'LTIB': np.array([50.04, 235.91, 364.32]),
...           'RANK': np.array([422.77, 217.74, 92.86]),
...           'LANK': np.array([58.57, 208.55, 86.17]) }
>>> 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.18],
...           [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]]])]
>>> delta = 0
>>> [np.around(arr, 2) for arr in ankleJointCenter(frame,knee_JC,delta,vsk)] 
[array([393.76, 247.68,  87.74]), array([ 98.75, 219.47,  80.63]), array([[[394.48, 248.37,  87.71],
[393.07, 248.39,  87.61],
[393.69, 247.78,  88.73]],
[[ 98.47, 220.43,  80.53],
[ 97.79, 219.21,  80.76],
[ 98.85, 219.6 ,  81.62]]])]