Skip to main content

python-mindrove-emg

Tools for recording, streaming, replaying, and analyzing MindRove EMG + IMU data.

This project is currently alpha software. It is intended for research workflows around MindRove Wi-Fi EMG devices, Lab Streaming Layer (LSL), XDF recordings, and quick gesture/state separability checks.

Features

  • Stream one MindRove device to LSL as EMG and IMU streams.
  • Record MindRove EMG + IMU data to compressed .npz files.
  • Stream either or both of two MindRove Wi-Fi devices from one GUI.
  • Apply optional EMG DC removal and bandpass filtering in the dual-device streamer.
  • Replay .npz or .xdf recordings to LSL.
  • Analyze event-labeled XDF recordings for state separability.

Installation

For GUI acquisition and streaming:

pip install "python-mindrove-emg[gui]"

For XDF replay support:

pip install "python-mindrove-emg[gui,playback]"

For offline separability analysis:

pip install "python-mindrove-emg[analysis]"

For development from a local checkout:

pip install -e ".[all,dev]"

Command-Line Tools

Single-device LSL streamer:

mindrove-lsl

Single-device recorder:

mindrove-recorder --output-dir recordings --session-name mindrove_session

Dual-device LSL streamer:

mindrove-dual-lsl

Dual-device streamer with custom LSL prefixes:

mindrove-dual-lsl --device-a-prefix MindRove_Left --device-b-prefix MindRove_Right

Dual-device streamer with explicit device IPs:

mindrove-dual-lsl --device-a-ip 192.168.4.1 --device-b-ip 192.168.5.1

Separability analysis for event-labeled XDF recordings:

mindrove-separability C:\path\to\xdf_folder --output-dir analysis_outputs\session001

Data Streams

The LSL tools expose:

  • EMG: 8 channels, float32, nominally 500 Hz.
  • Combined IMU: 9 channels, accelerometer + gyroscope + magnetometer.
  • Optional IMU breakout streams in the dual-device GUI: accelerometer, gyroscope, magnetometer.

Recording And Analysis Notes

The separability analyzer expects XDF files with:

  • A continuous MindRove signal stream.
  • A marker stream with prompt_onset events.
  • Gesture markers encoded like prompt_onset|phase=gesture|trial=001|gesture=hand_open|duration_s=5.000.

It extracts gesture windows, computes time-domain EMG features, and reports leave-one-recording-out accuracy, trial majority-vote accuracy, confusion matrices, pairwise accuracy, centroid distances, and a PCA plot.

Repository Hygiene

Do not commit local recordings, generated analysis outputs, virtual environments, __pycache__, or *.egg-info directories. These are ignored by .gitignore.

License

MIT. See LICENSE.

Metadata

Release files for python-mindrove-emg 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-mindrove-emg 0.1.0
File Size Uploaded
python_mindrove_emg-0.1.0.tar.gz 24.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-mindrove-emg 0.1.0
File Interpreter ABI Platform
python_mindrove_emg-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 52.6 kB

Release files / python_mindrove_emg-0.1.0.tar.gz

Download URL python_mindrove_emg-0.1.0.tar.gz
Size 24.6 kB
Tags Source
SHA-256 checksum
How to use checksums
117b046f64388c006d54ac17fa02db841e17a330b1cf189a656535ebc4bc5938
BLAKE2b-256 checksum
How to use checksums
1676b487d2c6ffa7a6a129960b9772de605b8b3ecb2def196abaeac3d4cd0cf6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.11

Release files / python_mindrove_emg-0.1.0-py3-none-any.whl

Download URL python_mindrove_emg-0.1.0-py3-none-any.whl
Size 28.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8b7ad67746c9f9c5acd41738853117fd74001610e82deea61d455ea3054cfcb
BLAKE2b-256 checksum
How to use checksums
e33c861e987ecc09113b539ab108bf24925d839c521e8a3fc2f4fdb387ba976f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.11

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page