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 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 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:
ECG with heart beat detection:
Documentation¶
For the full documentation of the API, visit: https://explorepy.readthedocs.io/
Troubleshooting¶
Please check the 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¶
License¶
This project is licensed under the MIT license. You can reach us at contact@mentalab.com.