pyCGM_Single.pycgmStatic.rotaxis_footflat

pyCGM_Single.pycgmStatic.rotaxis_footflat(frame, ankle_JC, vsk=None)

Calculate the anatomically correct foot joint center and axis function for a flat foot.

Takes in a dictionary of xyz positions and marker names and the ankle axis then Calculates the anatomically correct foot axis for a flat foot.

Markers used: RTOE, LTOE, RHEE, LHEE

Parameters
framearray

Dictionary of marker lists.

ankle_JCarray

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

vskdict, optional

A dictionary containing subject measurements from a VSK file.

Returns
R, L, foot_axis: list

Returns a list representing the correct foot joint center for a flat foot, the list contains 2 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.

Notes

If the subject wears shoe, Soledelta is applied. then axes are changed following Soledelta.

Examples

>>> import numpy as np
>>> from .pycgmStatic import rotaxis_footflat
>>> frame = { 'RHEE': [374.01, 181.58, 49.51],
...            'LHEE': [105.30, 180.21, 47.16],
...            '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.48, 220.43, 80.53]),
...            np.array([97.79, 219.21, 80.76]),
...            np.array([98.85, 219.60, 81.62])]]]
>>> vsk = { 'RightSoleDelta': 0.45, 'LeftSoleDelta': 0.45}
>>> [np.around(arr, 2) for arr in rotaxis_footflat(frame,ankle_JC,vsk)] 
[array([442.82, 381.62,  42.66]),
array([ 39.44, 382.45,  41.79]),
array([[[442.31, 381.8 ,  43.5 ],
        [442.03, 381.89,  42.12],
        [442.49, 380.67,  42.66]],
       [[ 39.15, 382.36,  42.74],
        [ 38.53, 382.16,  41.48],
        [ 39.75, 381.5 ,  41.79]]])]