pyCGM_Single.Pipelines.filtering

pyCGM_Single.Pipelines.filtering(Data)

Filter function. Given a dictionary of marker lists, the function applies the butterworth filter function on each element in the dictionary.

Parameters
Datadict
Dictionaries of marker lists.

{ [], [], [], …}

Returns
datadict

A copy of the inputted dictionary with the butterwise filter applied to each element.

Examples

>>> import numpy as np
>>> from .Pipelines import filtering
>>> from .pyCGM_Helpers import getfilenames
>>> from .pycgmIO import loadData, dataAsDict
>>> motionData = loadData(getfilenames(x=2)[0])
SampleData/ROM/Sample_Dynamic.c3d
>>> motionDataDict = dataAsDict(motionData,npArray=True)
>>> np.around(filtering(motionDataDict)['HEDO'], 2) 
array([[ 250.34,  207.52, 1612.12],
       [ 250.37,  207.63, 1612.14],
       [ 250.4 ,  207.75, 1612.16],
       ...,
       [ 278.46,  292.57, 1612.41],
       [ 278.07,  293.23, 1612.49],
       [ 277.67,  293.88, 1612.56]])