Conduct research on the effect of different proportions of visual target and non-target stimulations on the brain, through data analysis on event related potential collected.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Investigating the Effect of Target Ratio in Visual Oddball Paradigm Experiments on P300 Components

An International Baccalaureate Higher Level Mathematics Investigation


Many of the scripts are modified upon or are from Muse-lsl, a collection of Python scripts to use the Muse 2016 BLE headset with LSL.



You must have a Muse headband 2016 or a LowdownFocus Glasses. If you have a Windows or MacBook, please ensure you have a BLED112 dongle in order to establish BLE connection.

This code is only compatible with the 2016 version of the Muse headset as well as the Smith LowdownFocus glasses.


Install a variety of pip packages required in both Python2 and Python3.

pip install -r requirements.txt
pip3 install -r requirements.txt

Please install mne 0.13 in Python2 and mne 0.15 in Python3

pip install mne==0.13
pip3 install mne

Install the older Pygatt version for the BLE communication. pip install pygatt==3.1.1

Finally, the code for streaming and recording data is compatible with Python 2.7 and Python 3.x. However, the code for stimulus presentation relies on psychopy and therefore only runs with Python 2.7.

Running Experiments

Start the experiment by establishing streaming.


Once the stream is up and running, you can visualize it with


Start the P300 experiment in another terminal by executing

python experiment/ -d 120 & python -d 120


Samples of data that I collected can be found in /data/ All data are in .csv format, and the subject names are replaced with numbers to ensure privacy. If you choose to collect your data, make sure that your data is put in a hierarchy such as data/category/subjectX/sessoinX/date+time.csv

Data Analysis

To produce the raw EEG power density spectrum and the ERP waveform, please edit the data folder reference in /script/

And then run python /script/

For sample procedure of data analysis, check out this notebook by Alexandre Barachant.

My full research would be published soon. For now, you can check the ERP waveforms that I generated in /graph/