This repository contains the backend (data collection, processing, and classification) for the Non-invasive Closed-Loop Stimulus-presentation (NICLS) experiment (see https://doi.org/10.1101/2023.08.25.553563).
This connects the behavioral task (a Unity application) and BioSemi EEG to a backend that classifies behaviorally relevant brain states and relays those results back to the task.
Create and activate conda environment
conda create -n NICLS python=3.9
conda activate NICLS
Install ptsa_new first
conda install -y -c pennmem fftw
conda install -y -c conda-forge cxx-compiler
conda install -y numpy scipy xarray swig traits
git clone https://github.com/pennmem/ptsa.git
cd ptsa
git checkout a4e9298
pip install -e .
- OR:
python setup.py install
- OR:
cd ..
Install NICLServer
pip install -e .
- OR:
python setup.py install
- OR:
cd ..
In order to run tests with fake biosemi data, you need to use pennmem/eegim
,
which has been set up as a git submodule in this repository.
-
Initialize the submodules
git submodule update --init --recursive
-
Run the tests
cd tests
python main1b.py (fake Courier & fake biosemi)
python main2.py (fake Courier & real biosemi)
python main3.py (real Courier & fake biosemi)
cd ..
-
Check results
- Classifier results will print to screen once enough biosemi data has collected
- Logs will be stored in the "data" folder
Please see the docs folder for more information