Skip to content
/ NICLS Public

Software for collecting EEG data and relaying real-time classifier outputs, as in the manuscript "Decoding EEG for optimizing naturalistic memory" (Rudoler et al, 2024)

License

Notifications You must be signed in to change notification settings

pennmem/NICLS

Repository files navigation

NICLS

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.

Installation

Create and activate conda environment

  1. conda create -n NICLS python=3.9
  2. conda activate NICLS

Install ptsa_new first

  1. conda install -y -c pennmem fftw
  2. conda install -y -c conda-forge cxx-compiler
  3. conda install -y numpy scipy xarray swig traits
  4. git clone https://github.com/pennmem/ptsa.git
  5. cd ptsa
  6. git checkout a4e9298
  7. pip install -e .
    1. OR: python setup.py install
  8. cd ..

Install NICLServer

  1. pip install -e .
    1. OR: python setup.py install
  2. cd ..

Run Tests (under development)

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.

  1. Initialize the submodules

    1. git submodule update --init --recursive
  2. Run the tests

    1. cd tests
    2. python main1b.py (fake Courier & fake biosemi)
    3. python main2.py (fake Courier & real biosemi)
    4. python main3.py (real Courier & fake biosemi)
    5. cd ..
  3. Check results

    1. Classifier results will print to screen once enough biosemi data has collected
    2. Logs will be stored in the "data" folder

More information

Please see the docs folder for more information

About

Software for collecting EEG data and relaying real-time classifier outputs, as in the manuscript "Decoding EEG for optimizing naturalistic memory" (Rudoler et al, 2024)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •