EMG module

emgManager

class pyCGM2.EMG.emgManager.EmgManager(DATA_PATH, emgSettings=None)

Class to manage emg settings ( ie the emg.settings file)

Parameters
  • DATA_PATH (str) – data folder path

  • emgSettings (str,Optional[None]) – content of the emg.settings file

getChannelSection()

return the channel section of the emg settings

getChannels()

return the channel labels

getMuscles()

return the muscles

getNormalActivity()

return the normal activity muscle reference

getProcessingSection()

return the processing section of the emg settings

getSides()

return side of each emg

emgFilters

coactivationProcedures

This module contains co-activation procedures

check out the script : Tests est_EMG.py for examples

class pyCGM2.EMG.coactivationProcedures.FalconerCoActivationProcedure

Coactivation index according falconer and Winter

Falconer K, Winter DA. Quantitative assessment of cocontraction at the ankle joint in walking. Electromyogr Clin Neurophysiol. 1985;25:135–149. [PubMed] [Google Scholar]

run(emg1, emg2)

run the procedure.

Parameters
  • emg1 (str) – emg label .

  • emg2 (str) – emg label

Returns

list – Coactivation index

class pyCGM2.EMG.coactivationProcedures.UnithanCoActivationProcedure

Coactivation procedure according Unithan et al, 1996

Unnithan VB, Dowling JJ, Frost G, Volpe Ayub B, Bar-Or O. Cocontraction and phasic activity during GAIT in children with cerebral palsy. Electromyogr Clin Neurophysiol. 1996;36:487–494.

run(emg1, emg2)

run the procedure.

Parameters
  • emg1 (str) – emg label .

  • emg2 (str) – emg label

Returns

list – Coactivation index

discreteEmgProcedures

Module containes Filter and Procedure for extracting discrete value ( e.g : amplitude) from each emg signal

class pyCGM2.EMG.discreteEmgProcedures.AmplitudesProcedure

This procedure computes EMG amplitude for each gait phases

detect(analysisInstance, emgLabels, emgMuscles, emgContexts)

Compute amplitudes

Parameters
  • analysis (pyCGM2.Processing.analysis.Analysis) – A pycgm2 analysis instance

  • emgLabels (list) – emg labels

  • emgMuscles (list) – muscle matching emg labels

  • emgContexts (list) – side of each eamg labels

normalActivation

The module contains convenient function for getting the normal emg activity of the muscles listed in the file (pyCGM2/Data/normativeData/emg/normalActivation.json).

pyCGM2.EMG.normalActivation.getNormalBurstActivity(muscle, fo)

get onsets and offsets of a specific muscle.

Parameters
  • muscle (str) – muscle label listed in normalActivation.json

  • fo (int) – foot off frame

pyCGM2.EMG.normalActivation.getNormalBurstActivity_fromCycles(muscle, ff, begin, fo, end, apf)

get onsets and offsets of a specific muscle from .

Parameters
  • muscle (str) – muscle label listed in normalActivation.json

  • ff (int) – first frame of the btk.acquisition

  • begin (int) – initial frame of cycle

  • fo (int) – foot off frame

  • end (int) – final frame of the cycle

  • apf (int) – nNumber of analog sample per frame