Skip to content

WiIIson/EMGFlow-Python-Package

Repository files navigation

EMGFlow

Versions Coverage pypi Downloads Downloads

A Python package for preprocessing and feature extraction of surface electromyography (sEMG) signals.

EMGFlow streamlines end-to-end sEMG analysis for research and clinical workflows. It is designed for batch processing of large datasets typical in machine learning, extracting a comprehensive set of 33 time- and frequency-domain features. The package uses Pandas DataFrames throughout for interoperability and supports flexible file selection with regular expressions. An interactive dashboard visualises signals at each preprocessing stage to aid decisions.

EMGFlow includes a Shiny dashboard for visualising preprocessing effects. Pipeline steps can be overlaid or shown individually, and files are selected from a drop-down menu. A checkbox toggles between a time-domain amplitude view and a spectral view:

Example 1

Statement Of Need

Although several packages process physiological and neurological signals, support for sEMG has remained limited. Many lack a comprehensive feature set for sEMG, forcing researchers to use a patchwork of tools. Others focus on event detection with GUI-centric workflows that suit continuous recordings of a single participant, but complicate batch feature extraction common in machine learning.

EMGFlow, a portmanteau of EMG and Workflow, fills this gap by providing a flexible pipeline for extracting a wide range of sEMG features, with a scalable design suited for large datasets.

Example

As a quick example, the following will create a feature file, and create a plot of the "EMG_zyg" column:

import EMGFlow as ef

# Get path dictionary
path_names = ef.make_paths()

# Load sample data
ef.make_sample_data(path_names)

# Preprocess signals
ef.clean_signals(path_names, sampling_rate=2000, notch_f0=50)

# Plot data on the "EMG_zyg" column
ef.plot_dashboard(path_names, 'EMG_zyg', sampling_rate=2000)

# Extract features and save results in "Features.csv" in feature_path
df = ef.extract_features(path_names, sampling_rate=2000)

Documentation

pypi pypi

General:

Examples:

Installation

EMGFlow can be installed from PyPI:

pip install EMGFlow

Once installed, the package can be loaded as follows:

import EMGFlow

Project dependencies can be seen in the build file.

Contributions

Contributions and community guidelines can be seen the contributing guide.

Citations

This package can be cited as follows:

@software{Conley_EMGFlow_2026,
  author = {Conley, William and Livingstone, Steven R},
  month = {02},
  title = {{EMGFlow Package}},
  url = {https://github.com/WiIIson/EMGFlow-Python-Package},
  version = {1.1.2},
  year = {2026},
  note = "{\tt william@cconley.ca}"
}

If you are using a different version of EMGFlow, change the version tag to the version you are using.

You can also use the EMGFlow.package_citation() function to print the citation for the version of EMGFlow you are using, or use the EMGFlow.package_version() function to view the package version you are using.

About

Github repository for the EMGFlow Python package.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors