pyCGM_Single.Pipelines.clearMarker

pyCGM_Single.Pipelines.clearMarker(data, name)

Clear Markers function

Clears the markers in a given dictionary for a given name.

Parameters
datadict
Dictionaries of marker lists.

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

namestr

Name for the specific marker to be cleared in data.

Returns
datadict

The original data dictionary with the cleared marker.

Examples

>>> import numpy as np
>>> from .Pipelines import clearMarker
>>> data = [{'LTIL': np.array([-268.15,  327.53,   30.17]),
... 'RFOP': np.array([ -38.45, -148.68,   59.21])},
... {'LTIL': np.array([-273.15,  324.53,   36.17]),
... 'RFOP': np.array([ -38.45, -148.68,   59.21])}]
>>> name = 'LTIL'
>>> cleared = clearMarker(data, name)
>>> [sorted(cleared[0].items()), sorted(cleared[1].items())] 
[[('LTIL', array([nan, nan, nan])),
('RFOP', array([ -38.45, -148.68,   59.21]))],
[('LTIL', array([nan, nan, nan])),
('RFOP', array([ -38.45, -148.68,   59.21]))]]