pyCGM_Single.pyCGM.getangle_spi¶
-
pyCGM_Single.pyCGM.getangle_spi(axisP, axisD)¶ Spine angle calculation.
This function takes in two axes and returns three angles and uses the inverse Euler rotation matrix in YXZ order.
Returns the angles in degrees.
- Parameters
- axisPlist
Shows the unit vector of axisP, the position of the proximal axis.
- axisDlist
Shows the unit vector of axisD, the position of the distal axis.
- Returns
- anglelist
Returns the gamma, beta, alpha angles in degrees in a 1x3 corresponding list.
Examples
>>> import numpy as np >>> from .pyCGM import getangle_spi >>> axisP = [[ 0.04, 0.99, 0.06], ... [ 0.99, -0.04, -0.05], ... [-0.05, 0.07, -0.99]] >>> axisD = [[-0.18, -0.98,-0.02], ... [ 0.71, -0.11, -0.69], ... [ 0.67, -0.14, 0.72 ]] >>> np.around(getangle_spi(axisP,axisD), 2) array([ 2.97, 9.13, 39.78])