Skip to main content

Python API for Mentalab biosignal aquisition devices

Project description

.. image:: logo.png :scale: 100 % :align: center

========================= explorepy overview

explorepy is an open-source Python API designed to collect and process ExG 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 of ExG, orientation and environmental data.
  • Data recording in CSV and BDF+ formats.
  • Integration with LabStreaming Layer.
  • Electrode impedance measurements.
  • Explore device configuration.

Quick installation

For Windows users, the best way to install explorepy is to download the latest explorepy version from the release page <https://github.com/Mentalab-hub/explorepy/releases>_. 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 to Python 3.9.
  • Visual Studio 2015 community edition (Windows only. For package building).
  • Bluetooth header files (Linux only. Use: sudo apt-get install libbluetooth-dev).

Detailed installation instructions can be found on the installation page <https://explorepy.readthedocs.io/en/latest/installation.html>_.

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

To check explorepy is running use: :: explorepy acquire -n Explore_XXXX

For help, use: :: explorepy -h

Python code

In Python you can connect to the Explore device and print data using:

::

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:

.. image:: /images/Dashboard_EEG.jpg :width: 800 :alt: EEG Dashboard

ECG with heart beat detection:

.. image:: /images/Dashboard_ECG.jpg :width: 800 :alt: ECG Dashboard

Documentation

For full API documentation, visit: https://explorepy.readthedocs.io/.

Troubleshooting

If you are having problems, please check the troubleshooting <https://explorepy.readthedocs.io/en/latest/installation.html#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.

Authors

  • Mohamad Atayi_
  • Salman Rahman_
  • Andreas Gutsche_
  • Masooma Fazelian_
  • Philipp Jakovleski_
  • Florian Sesser_
  • Sebastian Herberger_

.. _Mohamad Atayi: https://github.com/bmeatayi .. _Salman Rahman: https://github.com/salman2135 .. _Andreas Gutsche: https://github.com/andyman410 .. _Masooma Fazelian: https://github.com/fazelian .. _Philipp Jakovleski: https://github.com/philippjak .. _Florian Sesser : https://github.com/hacklschorsch .. _Sebastian Herberger: https://github.com/SHerberger

License

This project is licensed under the MIT <https://github.com/Mentalab-hub/explorepy/blob/master/LICENSE>_ 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


Download files

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

Source Distribution

explorepy-1.6.1.tar.gz (1.0 MB view details)

Uploaded Source

Built Distributions

explorepy-1.6.1-cp310-cp310-win_amd64.whl (126.3 kB view details)

Uploaded CPython 3.10 Windows x86-64

explorepy-1.6.1-cp39-cp39-win_amd64.whl (126.3 kB view details)

Uploaded CPython 3.9 Windows x86-64

explorepy-1.6.1-cp38-cp38-win_amd64.whl (126.4 kB view details)

Uploaded CPython 3.8 Windows x86-64

explorepy-1.6.1-cp37-cp37m-win_amd64.whl (126.4 kB view details)

Uploaded CPython 3.7m Windows x86-64

explorepy-1.6.1-cp36-cp36m-win_amd64.whl (142.9 kB view details)

Uploaded CPython 3.6m Windows x86-64

File details

Details for the file explorepy-1.6.1.tar.gz.

File metadata

  • Download URL: explorepy-1.6.1.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.13

File hashes

Hashes for explorepy-1.6.1.tar.gz
Algorithm Hash digest
SHA256 57e351f926114c4926801d3a123659d7401445cc4cd8904a82d78772363ce3e6
MD5 fbed6da0c0c59682dc616cd5fd2b8cbd
BLAKE2b-256 e37eff4117e12aa3ac1a855432d35b7f73869a104c414a677ea78d8ac1145e3f

See more details on using hashes here.

File details

Details for the file explorepy-1.6.1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for explorepy-1.6.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a4df477a99f9b9285ec5e680a5da7bc807505ba36c5bdebb533aaa95b647ea2b
MD5 ac8dca104699182e954cc36b4ab6d9a2
BLAKE2b-256 24929917e69b5e1fa10d107a6143331775bc63cf5fc7b52fa849f796eec7024c

See more details on using hashes here.

File details

Details for the file explorepy-1.6.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: explorepy-1.6.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 126.3 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.13

File hashes

Hashes for explorepy-1.6.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4891559daef664023e918214ff34f2f4e82373378260dcbc6762fc63c5358393
MD5 f1806062e9c67c35371e10f74947f99f
BLAKE2b-256 fe3272adac7d832586d9256c3df1f0ec22910255a1f1bf2af0826b57dcca739b

See more details on using hashes here.

File details

Details for the file explorepy-1.6.1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: explorepy-1.6.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 126.4 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.13

File hashes

Hashes for explorepy-1.6.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 015b63796ac838bf5978fda850f2839f72fbf9896612560ef738c54cf5baec8c
MD5 7422bf3bbb487314e4b1be9c9a86b1a3
BLAKE2b-256 9ee40b1887d10b8f549089d1c6bb2743b6c4994532697139b0db22118ae76f80

See more details on using hashes here.

File details

Details for the file explorepy-1.6.1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: explorepy-1.6.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 126.4 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.13

File hashes

Hashes for explorepy-1.6.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 2cc34e269ea58b6cb807de8fa8f9b46aacefce6921ff59748157be12c025cf8a
MD5 a173f4f395ec090647335f29fab46ad7
BLAKE2b-256 65188d218df4d27de712db23b5a5c866d632ea3d5adaf0b4ce5475d2fad3003f

See more details on using hashes here.

File details

Details for the file explorepy-1.6.1-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: explorepy-1.6.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 142.9 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.13

File hashes

Hashes for explorepy-1.6.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 96256eb5a6163774cce916f720f843799d253e547d747b11e268b1e81e7c79d5
MD5 8c6139aed50eaf4a600147c05dff20e0
BLAKE2b-256 4f2e4db6bc3b02596efb1cdbc2e651d12301fc3b0b7df940df9fe6daf8d71fa6

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