Skip to content

EMG Toolbox

EMG Toolbox is a Python package to preprocess, analyse and plot electromyography (EMG) signals, including high-density recordings from electrode grids.

The package is composed of the following modules:

  • tools: rearrange channels between (samples, channels) and grid (rows, cols, samples) formats, and replace bad channels with the mean of their neighbours.
  • prepro: Butterworth bandpass, highpass, lowpass and powerline (bandstop) filters.
  • feats: amplitude features such as the moving-window root mean square (RMS).
  • freq: amplitude spectrum and power spectral density (periodogram or Welch).
  • plots: plot channels over time, PSDs, PSD maps across channels, and spectrograms.

Installation

Install the latest release from PyPI (Python 3.10 or newer):

pip install emg-tools

The package is imported as emg_tools.

Head to Getting started for a worked example, or browse the API reference for every function and its arguments.

Citation

If you use this code in your research, please cite it using the Cite this repository button on GitHub, which reads CITATION.cff.