pyCGM_Single.pycgmIO.splitVskDataDict

pyCGM_Single.pycgmIO.splitVskDataDict(vsk)

Splits a dictionary of vsk file values into labels and data arrays

Parameters
vskdict

Dictionary of subject measurement values. Dictionary keys correspond to names in labels and dictionary values correspond to values in data.

Returns
labels, datatuple

labels is a list of label names for vsk file values. data is a numpy array holding the corresponding values.

Examples

>>> from numpy import array, array_equal # Used to compare numpy arrays
>>> import sys
>>> vsk = {'MeanLegLength':940.0, 'LeftKneeWidth':105.0, 'RightAnkleWidth':70.0}
>>> labels, data = splitVskDataDict(vsk)
>>> flag = True # False if any values do not match
>>> for i in range(len(labels)):
...     if (vsk[labels[i]] != data[i]):
...         flag = False
>>> flag
True