All Projects → PolyCortex → pyMuse

PolyCortex / pyMuse

Licence: MIT license
Python tools associated with Muse headband

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to pyMuse

EEGEdu
Interactive Brain Playground - Browser based tutorials on EEG with webbluetooth and muse
Stars: ✭ 91 (+89.58%)
Mutual labels:  muse-data

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:

  • EEG acquisition methods like MuseOSCInputStream to get data from MuseDirect.
  • Pipeline creation is extensible and modulable to your own needs. If you need a need a custom stage for your pipeline, just inherit from PipelineStage.
  • Pipeline can be forked to process multiple outputs from a same source signal.
  • Each PipelineStage has its own thread and are automatically linked together by thread-safe queues. They provides hooks for their initialization and their shutdown.

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:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].