Skip to main content

A general EMG processing and feature extraction package.

Project description

EMGFlow

The open workflow for EMG signal processing and feature extraction.

EMGFlow is a Python package for researchers and clinicians to engage in signal processing. EMGFlow provides a broad range of functions to meet your EMG signal processing needs, without prescribing a specific workflow. EMGFlow follows open standards of data processing, such as CSV files and Pandas data frames to allow easy integration. With functions to extract 32 different features according to your needs, EMGFlow provides a uniquely deep feature extraction.

EMGFlow also includes an easy method for producing detailed graphs of EMG signals in large quantities.

Example

As a quick example, the following will create a feature file, starting with a folder of raw data:

import EMGFlow

# Paths for data files
raw_path = '/data/raw'          # Raw file contains raw data
notch_path = '/data/notch'
band_path = '/data/bandpass'    # Additional files are empty
smooth_path = '/data/smoothed'
feature_path = '/data/feature'

# Sampling rate for all files
sampling_rate = 2000

# Filter parameters
notch_vals = [(50, 5)]  # Notch filters to apply (Q, Hz)
band_low = 20           # Low threshold for bandpass filter
band_high = 140         # High threshold for bandpass filter
smooth_window = 50      # Window size for smoothing filter

# Preprocess signals
EMGFlow.NotchFilterSignals(raw_path, notch_path, sampling_rate, notch_vals)
EMGFlow.BandpassFilterSignals(notch_path, band_path, sampling_rate, band_low, band_high)
EMGFlow.SmoothFilterSignals(band_path, smooth_path, sampling_rate, smooth_window)

# Extract features and save results in "Features.csv" in feature_path
df = EMGFlow.ExtractFeatures(band_oath, smooth_path, feature_path, sampling_rate)

Documentation

To see full documentation, see the GitHub page.


Installation

EMGFlow can be installed from PyPI:

pip install EMGFlow

Once installed, the package can be loaded as follows:

import EMGFlow

Citations

This package can be cited as follows:

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

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.0.16.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

emgflow-1.0.16-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: emgflow-1.0.16.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for emgflow-1.0.16.tar.gz
Algorithm Hash digest
SHA256 6e74df6137b07dfa74b462454fd8a0ad09e3b68cda2b70b7fbed2cb6b56962fa
MD5 cb827455ea73e4a9d4cc97f7d4add01d
BLAKE2b-256 19f08f10c2bb7f49bc4a941c0e69306c74b5e3ea447a92917e4fa035f68b6fc4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: emgflow-1.0.16-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for emgflow-1.0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 80fedcbf437cd4ced97e9834166e5851ac88bfa811f3c8b4fe1f00dc6ebd0457
MD5 3ab2b312fcb6dd03d6c2fcf11ac80492
BLAKE2b-256 64ff4c1873868015647aaed18362780d2b85d5c13f935f544b789c74c83b9aef

See more details on using hashes here.

Supported by

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