GithubHelp home page GithubHelp logo

simonguozirui / math-ia-p300 Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 38.91 MB

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.

Home Page: https://s3.amazonaws.com/simon-guo-research/P300-Research.pdf

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%
bci eeg eeg-data eeg-headband event-related-potentials erp p300 p3 python python3 python2

math-ia-p300's Introduction

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

An International Baccalaureate Higher Level Mathematics Investigation

Credit

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.

Requirements

Hardware

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.

Software

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.

python muse-lsl.py --a YOUR_DEVICE_MAC_ADDRESS

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

python3 lsl-viewer-V2.py

Start the P300 experiment in another terminal by executing

python experiment/generate_Visual_P300.py -d 120 & python lsl-record.py -d 120

Data

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/P300.py

And then run python /script/P300.py

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/

math-ia-p300's People

Contributors

simonguozirui avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.