Python API for Mentalab biosignal aquisition devices
Project description
Explorepy overview
Explorepy is an open-source Python API designed to collect and process biosignal data using Mentalab’s Explore device. Amongst other things, Explorepy provides the following features:
Real-time streaming of ExG, orientation and environmental data
Real-time visualization
Data recording in CSV and BDF+ formats
LSL integration
Impedance measurement
Explore device configuration
Quick installation
For Windows users, the best way to install Explorepy is to download the latest Explorepy version from the the release page or use pip. Please note that dependencies will install automatically from the release page.
For other operating systems, or to build the package manually on Windows, please refer to the information below.
Requirements
Python 3.6 or newer versions
Visual Studio 2015 community edition (only Windows, in case of building the package)
Bluetooth header files (only Linux -> use this command: sudo apt-get install libbluetooth-dev)
Detailed installation instructions can be found on the installation page.
To install explorepy from PyPI run:
pip install explorepy
To install the latest development version (git must be installed before running this command):
pip install git+https://github.com/Mentalab-hub/explorepy
Get started
CLI command
For a simple, quick start of Explorepy, run:
explorepy acquire -n Explore_XXXX
Enter explorepy -h for help.
Python code
When working in Python, the following connects to the Explore device and prints the data.
import explorepy explorer = explorepy.Explore() explorer.connect(device_name="Explore_XXXX") # Put your device Bluetooth name explorer.acquire()
You can also visualize the data in real-time.
import explorepy explorer = explorepy.Explore() explorer.connect(device_name="Explore_XXXX") # Put your device Bluetooth name explorer.visualize(bp_freq=(.5, 30), notch_freq=50)
EEG:
ECG with heart beat detection:
Documentation
For full API documentation, visit: https://explorepy.readthedocs.io/
Troubleshooting
If you are having problems, please check the troubleshooting section of the documentation.
If you are still having problems, send us your error log via Sentry (note: Explorepy will send the log automatically once you have provided permission), or send us the log file via email to contact@mentalab.com. The log file is usually found under:
Windows: <Windows Drive>:\Users\<USER_NAME>\AppData\Local\mentalab\explorepy\Logs\explorepy.log
Ubuntu: /home/<USER_NAME>/.cache/explorepy/log/explorepy.log
Mac OS: /Users/<USER_NAME>/Library/Logs/explorepy/explorepy.log
You can also create a new issue in the GitHub repository.
License
This project is licensed under the MIT license. You can reach us at contact@mentalab.com.
Changelog
1.6.0 (23.11.2021)
Remove dependency on Pybluez
Add SSVEP offline experiment
Add P300 example
Update LSL stream names
Fixing some bugs
1.5.2 (22.09.2021)
Hotfix for impedance disable bug
1.5.1 (21.7.2021)
Hotfix for installation bug
1.5.0 (20.7.2021)
Push to LSL button in the GUI
Search free port for initialization of the dashboard
Update installation procedure for Windows
Fixing some minor bugs
1.4.0 (31.03.2021)
Baseline correction feature in the visualization
Error logging system (Logging and Sentry)
Fix a bug of SDK in MacOS
Change the default Bluetooth interface to SDK
Improved FFT visualization
More precise local time in all OSes
1.3.0 (30-12-2020)
GUI resizing for different screen resolutions
Added event button to dashboard
Improvement of impedance measurement
Fixed minor bugs
1.2.0 (25-11-2020)
Standalone installer for Windows OS
Fix bugs in ExploreSDK
Create new file on device settings change
1.1.0 (27-08-2020)
MacOS support
Fix bugs
Add module disable/enable feature
Enhanced user interface
Add unique lsl stream names
1.0.0 (22-05-2020)
Add ExploreSDK as the Bluetooth interface
New dark theme
Record module in dashboard
Improvement in visualization perfrmance
CLI migration to Click
0.6.0 (17-02-2020)
EDF (BDF+) file writer
Channel disable/enable feature
Calibration of movement sensors
Extraction of physical orientation (angle and rotation)
Soft marker event
Visualization performance enhancement
Automatic number of channel and sampling rate detection
Exception handling improvement
Command for soft reset of Explore
Marker visualization
0.5.0 (25-11-2019)
Impedance measurement
Send commands to device
Configuring device settings
Update push to lsl feature
0.4.0 (09-09-2019)
Added marker feature
Timer based recording
Fixed a bug in csv file writer
Fixed a bug in device reconnect
Improved performance of dashboard visualization
0.3.1 (28-05-2019)
Fixed a bug in 8-channel ExG packet conversion
Fixed a minor bug in the record function
Updated the documentation
0.3.0 (10-05-2019)
Explore dashboard
Real-time visualization of ExG and orientation signal
Device information in Dashboard
Environmental data (battery, temperature and light)
Real-time bandpass filter
New packet structures (ADS1294R & ADS1298R)
Heart rate estimation and R-peaks detector in dashboard
0.2.0 (2019-03-08)
Added real-time recording feature
Added Command Line Interface
Added lsl integration
Added new packet classes
Fixed reconnect issues
Removed input requests inside functions
0.1.0 (2019-01-18)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for explorepy-1.6.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5aebd828dc6665e562290420369b0618a436c089471522416656d6efeea4d8c |
|
MD5 | b09d06aa6ea9fca7fffab752b6a8ab75 |
|
BLAKE2b-256 | ccc57bebffc3055e2e83592914bfb4261954810d2e5ba3d68c5009f267640732 |
Hashes for explorepy-1.6.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3903f5df71d003da60c5f474421ccd3fcbb77cfb05055eec20bb39bbca54d61 |
|
MD5 | 4032d82c46e1770d57037d54eef059ed |
|
BLAKE2b-256 | cc0b7d57e38b25ae157fd374d7d4e7081e597954fed29e5bce9f7a268f47ca8a |
Hashes for explorepy-1.6.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3266a20c63e8f00d025a0d19628e2487542b3559e71581eba33a37a8db81aa95 |
|
MD5 | 7e11092fc27bfa392b078a655f87853e |
|
BLAKE2b-256 | 3b0b724b743dc3a7b8f7d7ab910fdb28da9724e1c9e8558d514029b2cd0b57a5 |