Skip to content

Add NeuroLog EEG acquisition app with Cortex client, GUI, recorder, and exporters#1

Open
K-Rutuparna1087 wants to merge 2 commits into
mainfrom
codex/generate-neurolog-project-structure-and-code
Open

Add NeuroLog EEG acquisition app with Cortex client, GUI, recorder, and exporters#1
K-Rutuparna1087 wants to merge 2 commits into
mainfrom
codex/generate-neurolog-project-structure-and-code

Conversation

@K-Rutuparna1087
Copy link
Copy Markdown
Owner

Motivation

  • Provide a modular desktop application for real-time EEG acquisition from Emotiv headsets via the Cortex WebSocket API (wss://localhost:6868).
  • Support secure authentication with clientId/clientSecret, live plotting, session metadata, manual markers, and standard exports for analysis workflows.
  • Organize the code for clarity and maintainability so the app can be extended or reused in experiments.

Description

  • Scaffolded a neuro_log package with the following modules: neuro_log/app.py (entry), neuro_log/api.py (Cortex WebSocket JSON-RPC client), neuro_log/gui.py (PyQt6 GUI + live plotting), neuro_log/recorder.py (recording buffer and exporters), and neuro_log/utils.py (helpers and env-based config); see README.md for usage notes.
  • Implemented the Cortex flow in CortexApiClient: connect to wss://localhost:6868, perform requestAccess/authorize, queryHeadsets, createSession, subscribe to eeg/dev, and injectMarker for manual markers, with callback hooks on_status, on_eeg, and on_battery for GUI integration.
  • Built a PyQt6 GUI (NeuroLogMainWindow) with live plot (matplotlib), connection/status/sampling/battery labels, Connect, Start Recording, Stop Recording controls, session metadata inputs, and manual marker inputs that call create_marker and store local markers.
  • Added EEGRecorder to accumulate samples and markers and export on stop to CSV (timestamp + channels), NumPy .npy (shape (n_samples, n_channels)), MNE .fif (annotations + subject/description), and a markers CSV; filenames are sanitized and written to recordings/.
  • Added requirements.txt listing runtime dependencies (PyQt6, websocket-client, matplotlib, numpy, pandas, mne) and an extended README.md with installation, credentials (EMOTIV_CLIENT_ID / EMOTIV_CLIENT_SECRET), headset connection, and run/export instructions.

Testing

  • Compiled the package to verify syntax with python -m compileall neuro_log, which completed successfully.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant