Skip to main content

Python API for Mentalab biosignal aquisition devices

Project description

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





==================
Explorepy overview
==================

Explorepy is Mentalab's open-source Python-based biosignal acquisition API for working with Mentalab Explore device. Amongst many things, it 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
==================
On a Windows machine, Explorepy can be installed using the installable file uploaded in
the `release page <https://github.com/Mentalab-hub/explorepy/releases>`_ or using pip. Please note using the installable
files, the dependencies will be installed automatically.

The following instructions are for other operating systems or in case you want to build the package yourself on Windows.


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``)


Please check out the `installation page <https://explorepy.readthedocs.io/en/latest/installation.html>`_ for more detailed instructions.

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:

.. 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 the full documentation of the API, visit: https://explorepy.readthedocs.io/

Troubleshooting
===============
Please check the `troubleshooting <https://explorepy.readthedocs.io/en/latest/installation.html#troubleshooting>`_
section of the documentation.

If you do not find the solution in the above link, please send us the error log via Sentry (Explorepy will send the log
automatically after your permission) or send us the log file via email to contact@mentalab.com. The log file can be
found in the following path.

* 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.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.4.0.tar.gz (1.1 MB view details)

Uploaded Source

Built Distributions

explorepy-1.4.0-cp39-cp39-win_amd64.whl (193.6 kB view details)

Uploaded CPython 3.9 Windows x86-64

explorepy-1.4.0-cp38-cp38-win_amd64.whl (193.7 kB view details)

Uploaded CPython 3.8 Windows x86-64

explorepy-1.4.0-cp37-cp37m-win_amd64.whl (273.6 kB view details)

Uploaded CPython 3.7m Windows x86-64

explorepy-1.4.0-cp36-cp36m-win_amd64.whl (273.5 kB view details)

Uploaded CPython 3.6m Windows x86-64

File details

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

File metadata

  • Download URL: explorepy-1.4.0.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.10

File hashes

Hashes for explorepy-1.4.0.tar.gz
Algorithm Hash digest
SHA256 95de8fe279f14922aa6118db32554fc25d9c21debf759af87fbb80e85bdaad10
MD5 31e50ad5293946a4fdc053393efc77d5
BLAKE2b-256 dd59bb30f3466c5c1d42d085259d6891a0af64fa9ee31cedcea352b5477d3e5e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: explorepy-1.4.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 193.6 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.10

File hashes

Hashes for explorepy-1.4.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 bf8c3de58dcc67837ab07514c3958eb31859b1d8af1c16d16be8d8db8761b9c3
MD5 c3e5ff698e6136cc5f25a61a54debf72
BLAKE2b-256 9938dba8d720e91bbd7e07606119fa6b93e1db38226d9267740903e91bdb00e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: explorepy-1.4.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 193.7 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.10

File hashes

Hashes for explorepy-1.4.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 e4ba2f24fada4c5903f90b5673cc318b29b28d351fa503b187a2f128f27d12c6
MD5 a0c850197113869c8c1097bdbb66504a
BLAKE2b-256 080e14a4c1a0857115aaa53d12d9ad789645386e9cf7c7e8e7262eb741d5400b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: explorepy-1.4.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 273.6 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.10

File hashes

Hashes for explorepy-1.4.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 3aad157ee69cdc28f646c2ae2c00fe733d19f2f5d3b2bba49688d210d4c55554
MD5 2370319a5891d905a55420679e521ec7
BLAKE2b-256 38ed09cce3f5b8cc5d06fb597a4c2ff7158b29a9df7b05f662991ebd30471bb7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: explorepy-1.4.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 273.5 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.10

File hashes

Hashes for explorepy-1.4.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 1b5654ac4163c19a91b0f9f1ee6b3e2cbc8a86424a6cb0319203d0f001cd3353
MD5 d014eb81a51f604ab7d72199bef83436
BLAKE2b-256 63d40ad372c00bfd4ba4c01d38af7798a62b768a7ac4e2e354dfc8957105ad03

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