pyCGM_Single.pycgmStatic.uncorrect_footaxis

pyCGM_Single.pycgmStatic.uncorrect_footaxis(frame, ankle_JC)

Calculate the anatomically uncorrected foot joint center and axis function.

Takes in a dictionary of xyz positions and marker names and takes the ankle axis. Calculate the anatomical uncorrect foot axis.

Markers used: RTOE, LTOE

Parameters
framedict

Dictionary of marker lists.

ankle_JCarray

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

Returns
R, L, foot_axislist

Returns a list representing the incorrect foot joint center, the list contains two 1x3 arrays representing the foot axis origin x, y, z positions and a 3x2x3 list containing the foot axis center in the first dimension and the direction of the axis in the second dimension. This will be used for calculating static offset angle in static calibration.

Examples

>>> import numpy as np
>>> from .pycgmStatic import uncorrect_footaxis
>>> frame = { 'RTOE': [442.82, 381.62, 42.66],
...           'LTOE': [39.44, 382.45, 41.79]}
>>> 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])]]]
>>> [np.around(arr, 2) for arr in uncorrect_footaxis(frame,ankle_JC)] 
[array([442.82, 381.62,  42.66]),
array([ 39.44, 382.45,  41.79]),
array([[[442.94, 381.9 ,  43.61],
        [441.88, 381.97,  42.68],
        [442.49, 380.72,  42.96]],
       [[ 39.5 , 382.7 ,  42.76],
        [ 38.5 , 382.14,  41.93],
        [ 39.77, 381.53,  42.01]]])]