Skip to main content

A general EMG processing and feature extraction package.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

emgflow-1.1.2.tar.gz (3.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

emgflow-1.1.2-py3-none-any.whl (613.7 kB view details)

Uploaded Python 3

File details

Details for the file emgflow-1.1.2.tar.gz.

File metadata

  • Download URL: emgflow-1.1.2.tar.gz
  • Upload date:
  • Size: 3.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for emgflow-1.1.2.tar.gz
Algorithm Hash digest
SHA256 cd641ec452b542fe6d08ffb1e2625855faed78cfe0ceb6d4d7f4319177f7021c
MD5 04edbd4e4131fb51f0527a70ade78ffe
BLAKE2b-256 81c8a7621f5ef3ce6433a9ecd1d5331aef9632a17da24823887b3f12d8d2f923

See more details on using hashes here.

File details

Details for the file emgflow-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: emgflow-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 613.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for emgflow-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ef3efa0899aa3b52607773bcb43872b00530d24f72757736b21cdded0f664ee9
MD5 0635fb5d6e605c75a143afb3ff93bf0b
BLAKE2b-256 470cfcf52cb2e6ad0d007c67ad5a94efdf5b53ee5966ef1d154c9e7481d00d18

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page