pyCGM_Single.pyCGM.findshoulderJC

pyCGM_Single.pyCGM.findshoulderJC(frame, thorax, wand, vsk=None)

Calculate the Shoulder joint center function.

Takes in a dictionary of marker names to x, y, z positions and the thorax axis and wand marker. Calculate each shoulder joint center and returns it.

Markers used: RSHO, LSHO Subject Measurement values used: RightShoulderOffset, LeftShoulderOffset

Parameters
framedict

Dictionaries of marker lists.

thoraxarray

Array containing several x,y,z markers for the thorax.

wandarray

Array containing two x,y,z markers for wand.

vskdict, optional

A dictionary containing subject measurements.

Returns
Sho_JCarray

Returns a 2x3 array representing the right shoulder joint center x, y, z, marker positions 1x3 followed by the left shoulder joint center x, y, z, marker positions 1x3.

Examples

>>> import numpy as np
>>> from .pyCGM import findshoulderJC
>>> vsk = { 'RightShoulderOffset' : 40.0, 'LeftShoulderOffset' : 40.0 }
>>> frame = {'RSHO': np.array([428.88, 270.55, 1500.73]),
...          'LSHO': np.array([68.24, 269.01, 1510.10])}
>>> thorax = [[[256.23, 365.30, 1459.66],
...        [257.14, 364.21, 1459.58],
...        [256.08, 354.32, 1458.65]],
...        [256.14, 364.30, 1459.65]]
>>> wand = [[255.92, 364.32, 1460.62],
...        [256.42, 364.27, 1460.61]]
>>> [np.around(arr, 2) for arr in findshoulderJC(frame,thorax,wand,vsk)]
[array([ 429.51,  274.77, 1453.92]), array([  64.49,  274.99, 1463.63])]