Skip to content
Place to hold code and files for BrainWave
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
Arduino added data_processor Apr 23, 2019
.gitignore added gitignore Feb 25, 2019
to_send.json Fix test Apr 30, 2019 Started implementing machine learning May 15, 2019


A python project which uses a Muse 2016 to make a servo-powered hand wave by using theta power as a biomarker for 'focus'.

Process chain

Users wear Muse and neural signal is sent to Windows PC through Muselsl and BlueMuse. Muselsl supports time series visualization using muselsl view. To start calibration with system, run Wave.ipynb. This will initiate a PsychoPy calibration screen which directs users to relax and focus. This trains our system to understand the users current specific theta power threshold which determines 'focused' vs 'non-focused' states.

Code Structure

Wave.ipynb : Main : The Calibration class and other metric collection things : Data record class for Calibration class to hold : Collects data from inlet : Returns the smooth band powers given the eeg_data : Calculates and returns the metrics (e.g. alpha, theta, beta, delta) given the smooth band powers

PsychoPy_Code/ : run_psychopy() to run the calibration visuals

PsychoPy_Code/pics : The images that PsychoPy uses

PsychoPy_Code/data : The data recoreded by PsychoPy records (not necessary)


  • contains the most up-to-date code for the PsychoPy calibration portion. To run, make sure you have PsychoPy dependencies installed Workflow:
    1. Introduction click
    2. Instructions click
    3. Loop (3 times, each with a random landscape and Waldo image)
      3a) Relax cue 1s
      3b) Relax 10s w/ Landscape image
      3c) Focus cue 1s
      3d) Focus 7s w/ Where's Waldo image
You can’t perform that action at this time.