PolyCortex / pyMuse

Python tools associated with Muse headband
http://polycortex.polymtl.ca/
MIT License
59 stars 16 forks source link
eeg-displayer muse-data muse-headset python

pyMuse

This repository contains tools for gathering and processing Muse signals using Python. With pyMuse you can configure and run an EEG pipeline faster than light.

Features

🚧 Pymuse is still a work in progress. But we aim to have a flexible and extensible architecture so you can use it to your own sauce.

For now, pyMuse already contains a lot of features:

Of course, many more will come in the following months. Stay tuned.

Example

   from pymuse.pipeline import Pipeline
from pymuse.configureshutdown import configure_shutdown
from pymuse.inputstream.muse_osc_input_stream import MuseOSCInputStream
from pymuse.pipelinestages.outputstream.muse_csv_output_stream import MuseCSVOutputStream

muse_osc_input_stream = MuseOSCInputStream(['eeg', 'beta_relative']) # Signal acquisition module
pipeline = Pipeline( # Pipeline modules are automagically linked together
muse_osc_input_stream.get_signal('eeg'),
MuseCSVOutputStream("recorded_eeg.csv")
)
# Ensure resources are freed when application is shutted down
configure_shutdown(muse_osc_input_stream, pipeline)
pipeline.start()
muse_osc_input_stream.start()

Installation & dependencies

You will need a few tools to get started with the Muse headset and pyMuse:

Do not hesitate to visit the Muse Developer website for additional information and to access the docs.

Installation of this package

Ensure you have downloaded the correct Python distribution and the pyMuse package (e.g., using git clone).

Open a terminal, go into the package and type:

pip install -r requirements.txt.

The installer should install all requirements, including: