# masseyagus/cocemi_2026 architecture

> Architecture diagram of the GitHub repository masseyagus/cocemi_2026, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/masseyagus/cocemi_2026
- Repository: https://github.com/masseyagus/cocemi_2026

## Overview

NeuroIA GUI is a desktop viewer for multichannel biomedical signals and time-aligned BIDS events. The user selects a NumPy signal, optional TSV events, channels, and display/processing settings in the launcher; the main window prepares the selected channels and coordinates signal display, playback, event markers, and optional topography. Filtering, event conversion, playback, and the three viewer widgets are distinct runtime responsibilities. Connections are supported by the excerpts, SOURCE INDEX references, or README architecture; unsampled implementation details are not inferred.

Main entry points: [`src/gui/main_window.py`](https://github.com/masseyagus/cocemi_2026/blob/main/src/gui/main_window.py) (Viewer coordinator), [`src/gui/launcher.py`](https://github.com/masseyagus/cocemi_2026/blob/main/src/gui/launcher.py) (Configuration launcher), [`src/gui/widgets/signal_display_widget.py`](https://github.com/masseyagus/cocemi_2026/blob/main/src/gui/widgets/signal_display_widget.py) (Signal display), [`main.py`](https://github.com/masseyagus/cocemi_2026/blob/main/main.py) (Application entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Launch and setup"]
  node_entry["Application entry<br/>[main.py]"]
  node_launcher["Configuration launcher<br/>[launcher.py]"]
end

subgraph group_signal["Signal preparation"]
  node_filters["Signal filters<br/>[filters.py]"]
  node_normalization["Channel normalization<br/>[main_window.py]"]
end

subgraph group_playback["Playback and display"]
  node_main_window["Viewer coordinator<br/>[main_window.py]"]
  node_engine["Playback engine<br/>[playback_engine.py]"]
  node_controls["Playback controls"]
  node_display["Signal display"]
end

subgraph group_events["Events and topography"]
  node_bids_loader["BIDS event loader<br/>[bids_events.py]"]
  node_topomap["Energy topomap<br/>[topomap_widget.py]"]
  node_montage["Electrode positions"]
end

node_user(("Viewer user"))
node_signal_file["NumPy signal"]
node_events_file["BIDS TSV"]

node_user -->|"starts"| node_entry
node_entry -->|"opens"| node_launcher
node_user -->|"configures"| node_launcher
node_signal_file -->|"loads"| node_launcher
node_events_file -->|"selects"| node_launcher
node_launcher -->|"launches"| node_main_window
node_main_window -->|"prepares signal"| node_filters
node_main_window -->|"normalizes channels"| node_normalization
node_main_window -->|"loads events"| node_bids_loader
node_main_window -->|"creates and ticks"| node_engine
node_controls -->|"emits actions"| node_main_window
node_main_window -->|"updates position"| node_controls
node_main_window -->|"sets signal and view"| node_display
node_main_window -->|"sets event markers"| node_display
node_main_window -->|"updates energy map"| node_topomap
node_montage -->|"positions electrodes"| node_topomap
node_bids_loader -->|"provides events"| node_display

click node_entry "https://github.com/masseyagus/cocemi_2026/blob/main/main.py"
click node_launcher "https://github.com/masseyagus/cocemi_2026/blob/main/src/gui/launcher.py"
click node_main_window "https://github.com/masseyagus/cocemi_2026/blob/main/src/gui/main_window.py"
click node_filters "https://github.com/masseyagus/cocemi_2026/blob/main/src/utils/filters.py"
click node_normalization "https://github.com/masseyagus/cocemi_2026/blob/main/src/gui/main_window.py"
click node_engine "https://github.com/masseyagus/cocemi_2026/blob/main/src/utils/playback_engine.py"
click node_controls "https://github.com/masseyagus/cocemi_2026/blob/main/src/gui/widgets/playback_controls.py"
click node_display "https://github.com/masseyagus/cocemi_2026/blob/main/src/gui/widgets/signal_display_widget.py"
click node_bids_loader "https://github.com/masseyagus/cocemi_2026/blob/main/src/utils/bids_events.py"
click node_topomap "https://github.com/masseyagus/cocemi_2026/blob/main/src/gui/widgets/topomap_widget.py"
click node_montage "https://github.com/masseyagus/cocemi_2026/blob/main/src/assets/montages/posiciones_64_canales.json"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_launcher,node_user toneBlue
class node_filters,node_normalization toneAmber
class node_main_window,node_engine,node_controls,node_display toneMint
class node_bids_loader,node_topomap,node_montage toneRose
class node_signal_file,node_events_file toneIndigo
```

## Components

### Launch and setup

- [Application entry](https://github.com/masseyagus/cocemi_2026/blob/main/main.py): `main.py`
- [Configuration launcher](https://github.com/masseyagus/cocemi_2026/blob/main/src/gui/launcher.py): `src/gui/launcher.py`

### Signal preparation

- [Signal filters](https://github.com/masseyagus/cocemi_2026/blob/main/src/utils/filters.py): `src/utils/filters.py`
- [Channel normalization](https://github.com/masseyagus/cocemi_2026/blob/main/src/gui/main_window.py): `src/gui/main_window.py`

### Playback and display

- [Viewer coordinator](https://github.com/masseyagus/cocemi_2026/blob/main/src/gui/main_window.py): `src/gui/main_window.py`
- [Playback engine](https://github.com/masseyagus/cocemi_2026/blob/main/src/utils/playback_engine.py): `src/utils/playback_engine.py`
- [Playback controls](https://github.com/masseyagus/cocemi_2026/blob/main/src/gui/widgets/playback_controls.py): `src/gui/widgets/playback_controls.py`
- [Signal display](https://github.com/masseyagus/cocemi_2026/blob/main/src/gui/widgets/signal_display_widget.py): `src/gui/widgets/signal_display_widget.py`

### Events and topography

- [BIDS event loader](https://github.com/masseyagus/cocemi_2026/blob/main/src/utils/bids_events.py): `src/utils/bids_events.py`
- [Energy topomap](https://github.com/masseyagus/cocemi_2026/blob/main/src/gui/widgets/topomap_widget.py): `src/gui/widgets/topomap_widget.py`
- [Electrode positions](https://github.com/masseyagus/cocemi_2026/blob/main/src/assets/montages/posiciones_64_canales.json): `src/assets/montages/posiciones_64_canales.json`

### Other components

- **Viewer user**
- **NumPy signal**
- **BIDS TSV**

## Connections

- Viewer user → Application entry: starts (evidence: `main.py`)
- Application entry → Configuration launcher: opens (evidence: `main.py`)
- Viewer user → Configuration launcher: configures (evidence: `README.md`)
- NumPy signal → Configuration launcher: loads (evidence: `src/gui/launcher.py`)
- BIDS TSV → Configuration launcher: selects (evidence: `src/gui/launcher.py`)
- Configuration launcher → Viewer coordinator: launches (evidence: `src/gui/launcher.py`)
- Viewer coordinator → Signal filters: prepares signal (evidence: `src/gui/main_window.py`)
- Viewer coordinator → Channel normalization: normalizes channels (evidence: `README.md`)
- Viewer coordinator → BIDS event loader: loads events (evidence: `src/gui/main_window.py`)
- Viewer coordinator → Playback engine: creates and ticks (evidence: `src/gui/main_window.py`)
- Playback controls → Viewer coordinator: emits actions (evidence: `README.md`)
- Viewer coordinator → Playback controls: updates position (evidence: `README.md`)
- Viewer coordinator → Signal display: sets signal and view (evidence: `README.md`)
- Viewer coordinator → Signal display: sets event markers (evidence: `README.md`)
- Viewer coordinator → Energy topomap: updates energy map (evidence: `README.md`)
- Electrode positions → Energy topomap: positions electrodes (evidence: `README.md`)
- BIDS event loader → Signal display: provides events (evidence: `README.md`)
