Skip to content

JuananMtez/NeuronLab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation


BCI

NeuronLab Framework

Brain Computer Interface (BCI) Framework for the study of biosignals.

About the project

BCI

NeuronLab is a secure, multiplatform, and web-based framework that provides a working environment to researchers where every phase of the BCI lifecycle (acquisition, preprocessing, features extraction, and classification) can be performed. Additionally, it defines sophisticated tools to study the EEG signals.

NeuronLab-GUI

Built With

React.js Electron.js

Getting Started

Prerequisites

  • Node.js >= v18.14.2.
  • Visual Studio to install dependencies.

Installation

  1. Clone the repo.
git clone https://github.com/JuananMtez/NeuronLab.git
  1. Change to project directory.
cd NeuronLab/NeuronLab-GUI
  1. Install Visual Studio.

  2. Install NPM packages.

npm install
  1. Modify properties in ./src/properties.js.
export const properties = {
    url_server: 'TO BE DEFINED',
    port: 'TO BE DEFINED',
    protocol: 'TO BE DEFINED'
};
parameter Description
url_server Domain where NeuronLab-Backend is deployed
port Port where NeuronLab-Backend is deployed
protocol Protocol (https or http)

Usage

Run NeuronLab-GUI in the development mode.

npm run electron-dev

Recording rules

Nowadays, NeuronLab only can acquire Electroencephalogram (EEG) signal by using Lab Streaming Layer (LSL) protocol, as well as, UDP to capture stimuli generated by other applications. The receviced UDP packages must have the following format:

{
    timestamp: float,
    stimulus: [int]
}

To avoid timestamps errors, they must be generated by the function local_clock() provided by LSL library. An example of code written in Python:

import socket
import json
import time
from pylsl import local_clock

server_ip = '127.0.0.1'
server_port = 5005
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

while True:
    data = {
        "timestamp": local_clock(),
        "stimulus": [1],
    }
    sock.sendto(json.dumps(data).encode('utf-8'), (server_ip, server_port))
    time.sleep(1)

NeuronLab-Backend

Built With

python FastAPI

Getting Started

Prerequisites

  • Python 3.8.
  • MySQL

Installation

  1. Clone the repo.
git clone https://github.com/JuananMtez/NeuronLab.git
  1. Change to project directory.
cd Neuronlab/NeuronLab-Backend
  1. Install dependencies.
pip install -r requirements.txt
  1. Create database in MySQL.

  2. Modify properties in ./app/config/properties.ini .

[DATABASE]
user = TO BE DEFINED
password = TO BE DEFINED
host = TO BE DEFINED
database = TO BE DEFINED

[SECURITY]
secret_key = TO BE DEFINED
algorithm = TO BE DEFINED
access_token_expire_minute = TO BE DEFINED
parameter Description
user MySQL user
password MySQL password
host MySQL host
database MySQL database
secret_key Key used to sign the JWT tokens
algorithm Algorithm used to sign the JWT token
access_token_expire_minute Token lifetime in minutes

Usage

Run NeuronLab-Backend.

python3 -m uvicorn app.main:app

The tables will be created in the database automatically.

Author

License

This project is licensed under the MIT License - see the LICENSE file for details

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published