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_2025,
  author = {Conley, William and Livingstone, Steven R},
  month = {10},
  title = {{EMGFlow Package}},
  url = {https://github.com/WiIIson/EMGFlow-Python-Package},
  version = {1.1.1},
  year = {2025},
  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.1.tar.gz (3.2 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.1-py3-none-any.whl (613.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for emgflow-1.1.1.tar.gz
Algorithm Hash digest
SHA256 18c75165ef113a5270afb8c5b050158dd53b77f52735ffff819f5228cb6d9950
MD5 cb45e14c6ed5080b6031124de3ca84b5
BLAKE2b-256 fa9b037898754fbd55f1df37a2e84b19106b93d98c4a87cfb6ada0202aea89bf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: emgflow-1.1.1-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.10.9

File hashes

Hashes for emgflow-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8375a5233c499976ff1d5169459d214e9c0fa028ddb7a90d32178e01352ff16d
MD5 3355065cad300ade9b0fb247035f5ba7
BLAKE2b-256 81d401a9d8812f548292bf0d457a32d71c8f96ca14758b840564989761060e62

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