pyCGM_Single.pyCGM.ankleJointCenter

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

Calculate the ankle joint center and axis.

Takes in a dictionary of marker names to x, y, z positions and the knee joint center. 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 [1].

Parameters
framedict

dictionaries 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.

Returns
R, L, axisarray

Returns an array that contains the ankle axis origin in a 1x3 array of xyz values, which is then followed by a 3x2x3 array composed of the ankle origin, x, y, and z axis components. The xyz axis components are 3x3 arrays consisting of the origin in the first dimension and the direction of the axis in the second dimension.

References

1

Baker, R. (2013). Measuring walking : a handbook of clinical gait analysis. Mac Keith Press.

Examples

>>> import numpy as np
>>> from .pyCGM import ankleJointCenter
>>> vsk = { 'RightAnkleWidth' : 70.0, 'LeftAnkleWidth' : 70.0,
...         'RightTibialTorsion': 0.0, 'LeftTibialTorsion' : 0.0}
>>> frame = { 'RTIB': np.array([433.97, 211.93, 273.30]),
...           'LTIB': np.array([50.04, 235.90, 364.32]),
...           'RANK': np.array([422.77, 217.74, 92.86]),
...           'LANK': np.array([58.57, 208.54, 86.16]) }
>>> knee_JC = [np.array([364.17, 292.17, 515.19]),
...           np.array([143.55, 279.90, 524.78]),
...           np.array([[[364.64, 293.06, 515.18],
...           [363.29, 292.60, 515.04],
...           [364.04, 292.24, 516.18]],
...           [[143.65, 280.88, 524.63],
...           [142.56, 280.01, 524.86],
...            [143.64, 280.04, 525.76]]])]
>>> delta = 0
>>> [np.around(arr, 2) for arr in ankleJointCenter(frame,knee_JC,delta,vsk)] 
[array([393.76, 247.68,  87.74]), array([ 98.74, 219.46,  80.62]), array([[[394.48, 248.37,  87.71],
[393.07, 248.39,  87.61],
[393.7 , 247.78,  88.73]],
[[ 98.47, 220.42,  80.52],
[ 97.79, 219.2 ,  80.75],
[ 98.84, 219.6 ,  81.61]]])]