> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usefusion.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Brain Recordings

> Record, visualize, and clean EEG brain signals in real-time with AI-powered denoising

# Brain Recordings

The **Recordings** page (`/recordings`) is your central hub for capturing and cleaning brain signals. Connect an EEG device, record live data, check signal quality in real-time, then denoise your recording with ZUNA — all in one flow.

```
Connect Device → Record EEG → Check Signal Quality → Stop → Denoise with ZUNA → Compare Before/After → Download
```

## Three Recording Modes

The page offers three modes, selectable via tabs at the top:

### 🧠 Live Recording

Connect your EEG headset and capture brain activity in real-time.

1. **Connect** — Choose your device (Neurosity Crown or Muse) and click Connect. The Muse uses Web Bluetooth; Neurosity uses OAuth.
2. **Record** — Hit Start Recording. You'll see a live waveform and a signal quality panel showing per-channel contact quality.
3. **Review** — Stop recording when you have enough data (minimum 6 seconds for ZUNA).
4. **Denoise** — Click "Denoise Recording" to send your data to the ZUNA GPU for artifact removal.

<Info>
  Record at least **6 seconds** — ZUNA processes in 5-second epochs and needs one full epoch plus a small buffer.
</Info>

### 📁 Upload CSV

Upload a previously recorded EEG file in CSV format. The page auto-detects whether the file came from a Neurosity Crown or Muse based on channel names in the header row.

* Supported formats: CSV with channel columns (e.g., `CP3,C3,F5,PO3,PO4,F6,C4,CP4` for Crown)
* Values should be in **microvolts (µV)**
* Optional timestamp column

### 🧪 Experiments

Run cognitive experiments (Stroop, Oddball, P300, etc.) from the built-in experiment library. An **experimental** panel lets you simultaneously record EEG during the experiment:

1. Choose an experiment from the dropdown
2. Expand the "Record EEG during experiment" panel
3. Connect your device and start recording
4. Run the experiment — brain activity is captured alongside
5. Stop and denoise when the experiment completes

<Note>
  The experiment recording feature is marked as **Experimental**. It records EEG in parallel with the jsPsych experiment but does not yet embed event markers into the EEG timeline.
</Note>

## Live Signal Quality

During active recording, a **Signal Quality** panel appears showing:

* **Bar chart** — Standard deviation per channel. Green (1.5–10) = great, Yellow (10–15) = good, Red (>15) = poor contact
* **Brain montage** — Top-down 2D head map with electrode positions colored by quality

This helps you adjust headset fit before committing to a long recording. Once most channels are green, your data will be high quality.

## ZUNA AI Denoising

After recording or uploading, the "Clean with ZUNA AI" step sends your EEG data to the ZUNA foundation model running on an NVIDIA A100 GPU.

### What ZUNA Removes

| Artifact            | Example                                               |
| ------------------- | ----------------------------------------------------- |
| Eye blinks          | Frontal voltage spikes from blinking                  |
| Muscle activity     | EMG from jaw clenching, forehead tension              |
| Environmental noise | 50/60 Hz line noise, cable movement                   |
| Drift               | Slow baseline wander from electrode impedance changes |

### What ZUNA Preserves

Neural oscillations (alpha, beta, theta, delta, gamma), event-related potentials (P300, N170), and other brain-generated signals.

### GPU Auto-Wake

The GPU VM auto-sleeps after 30 minutes of inactivity to minimize costs. When you trigger denoising:

1. If the GPU is **ready** — processing starts immediately (\~5–15s depending on recording length)
2. If the GPU is **sleeping** — the page automatically wakes it and retries every 15 seconds (up to 6 attempts). You'll see status updates like "Auto-retrying in 15s... (attempt 2/6)"
3. The GPU status indicator at the top of the page shows real-time availability (green = ready, yellow = starting, gray = sleeping)

You can also manually wake the GPU by clicking "Wake GPU" in the status bar.

## Before / After Comparison

After denoising completes, the page shows a **side-by-side comparison**:

| Left Panel                             | Right Panel                           |
| -------------------------------------- | ------------------------------------- |
| **Before — Raw Signal**                | **After — ZUNA Denoised**             |
| Your original recording with artifacts | Cleaned signal with artifacts removed |

Both panels use the same scale (±50 µV, adjustable) and time axis so you can directly compare waveform quality. The raw signal is captured at the moment you click Denoise, ensuring an accurate snapshot.

## After Denoising

Once denoising is complete, you have several options:

* **📥 Download Denoised CSV** — Export the cleaned signal as a CSV file for offline analysis in MATLAB, Python, or other tools
* **📊 View in Analysis** — Navigate to the `/analysis` page for deeper inspection, power spectral density, and more
* **Re-record** — Start a new recording and denoise again

### Result Summary

The results card shows key metadata:

| Field       | Description                                       |
| ----------- | ------------------------------------------------- |
| Input       | Number of channels and duration of your recording |
| Output      | Channels and duration after processing            |
| Channels    | List of EEG channel names in the output           |
| Sample Rate | Output sampling frequency (256 Hz)                |

## Supported Devices

| Device              | Channels                               | Connection        |
| ------------------- | -------------------------------------- | ----------------- |
| **Neurosity Crown** | 8 (CP3, C3, F5, PO3, PO4, F6, C4, CP4) | Bluetooth + OAuth |
| **Muse 2 / Muse S** | 4 (TP9, AF7, AF8, TP10)                | Web Bluetooth     |

Both devices stream at **256 Hz**. See [Brain Interfaces](/integrations/brain-interfaces) for detailed setup instructions.

## End-to-End Flow

```
┌──────────────┐     ┌──────────────┐     ┌──────────────┐     ┌──────────────┐
│  EEG Device  │────▶│  /recordings │────▶│  Backend API │────▶│  ZUNA GPU    │
│  Crown/Muse  │     │  Live viewer │     │  Auto-wake   │     │  A100 80GB   │
└──────────────┘     │  Sig quality │     │  /eeg-models │     │  Denoise     │
                     └──────┬───────┘     └──────────────┘     └──────┬───────┘
                            │                                         │
                            ▼                                         ▼
                     ┌──────────────┐                          ┌──────────────┐
                     │  Before/After│◀─────────────────────────│  Cleaned EEG │
                     │  Comparison  │                          │  JSON/CSV    │
                     └──────┬───────┘                          └──────────────┘
                            │
                     ┌──────▼───────┐
                     │  Download /  │
                     │  Analysis    │
                     └──────────────┘
```

For programmatic access to ZUNA (without the UI), see the [Model APIs](/model-apis/overview) documentation.
