Anomaly

Anomaly Filter

This module contains pyCGM2 anomaly filters to deal with either an anomaly detector procedure or an anomaly correction procedure

check out the script : Teststest_anomalies.py for examples

class pyCGM2.Anomaly.anomalyFilters.AnomalyCorrectionFilter(acq, filename, procedure)

anomaly corrector filter

Parameters
class pyCGM2.Anomaly.anomalyFilters.AnomalyDetectionFilter(acq, filename, procedure, **kwargs)

Anomaly detector filter

Parameters
Kwargs:

frameRange (list): frame boundaries

AnomalyDetectionProcedure

This module gathers anomaly detectors on markers, events, force plate signals and anthropometric data

check out the script : Teststest_anomalies.py for example

class pyCGM2.Anomaly.anomalyDetectionProcedures.AnomalyDetectionProcedure

abstract marker detector procedure

class pyCGM2.Anomaly.anomalyDetectionProcedures.AnthropoDataAnomalyProcedure(mp)

atnthropometric data anomaly detector

run(acq, filename, options)

run the procedure

Parameters
  • acq (btk.Acquisition) – a btk acquisition instantce

  • filename (str) – filename

  • options (dict) – passed options ( Not used so far)

class pyCGM2.Anomaly.anomalyDetectionProcedures.ForcePlateAnomalyProcedure

force plate anomaly detector

run(acq, filename, options)

run the procedure

Parameters
  • acq (btk.Acquisition) – a btk acquisition instantce

  • filename (str) – filename

  • options (dict) – passed options

Note

frameRange ([int, int]) is one key of the options argument

class pyCGM2.Anomaly.anomalyDetectionProcedures.GaitEventAnomalyProcedure

gait event anomaly detector

run(acq, filename, options)

run the procedure

Parameters
  • acq (btk.Acquisition) – a btk acquisition instantce

  • filename (str) – filename

  • options (dict) – passed options ( Not used so far)

class pyCGM2.Anomaly.anomalyDetectionProcedures.MarkerAnomalyDetectionRollingProcedure(markers, plot=False, **kwargs)

marker anomaly detection from rolling statistics

Parameters
  • markers (list) – marker labels;

  • plot (bool) – enable plot

Kwargs:

aprioriError (double): a priori error on the marker trajectory window (int): size of the rolling windows treshold (int) : detector threshold assoiated to the standard deviation method (str) : mean or median

run(acq, filename, options)

run the procedure

Parameters
  • acq (btk.Acquisition) – a btk acquisition instantce

  • filename (str) – filename

  • options (dict) – passed options from the filter

AnomalyCorrectionProcedure

class pyCGM2.Anomaly.anomalyCorrectionProcedures.MarkerAnomalyCorrectionProcedure(markers, anomalyIndexes, plot=False, **kwargs)

procedure to correct marker anomaly

Parameters
  • markers (list) – marker labels

  • anomalyIndexes (list) – indexes of the detected anomalies

  • plot (bool) – enable plot

Keyword Arguments

distance_threshold (float) – distance threshold between indexes

run(acq, filename)

run the procedure

Parameters
  • acq (btk.Acquisition) – a btk acquisition instantce

  • filename (str) – filename