|
| 1 | +# Phase 1 preprocess: 3-subject re-run |
| 2 | + |
| 3 | +Re-run of the channel-level preprocessing for the first 3 eligible Healthy Brain Network (HBN) Release 3 (R3) subjects with a complete `ThePresent` run, recovered after the original Stage B derivatives were lost in a repo transfer. Generated by `phase1_preprocess(SmokeSubjectCount=3)` on 2026-05-12. |
| 4 | + |
| 5 | +## What is tracked in git |
| 6 | + |
| 7 | +``` |
| 8 | +derivatives/preproc/ |
| 9 | + README.md (this file) |
| 10 | + qa_channels.csv per-subject QA table, all 3 rows |
| 11 | + params.json full parameter snapshot + tool versions |
| 12 | + sub-<ID>/figures/ |
| 13 | + sub-<ID>_stage-00-raw_psd.png power spectral density (PSD) per stage |
| 14 | + sub-<ID>_stage-01-hpf_psd.png |
| 15 | + sub-<ID>_stage-02-cleanline_psd.png |
| 16 | + sub-<ID>_stage-03-chanreject_psd.png |
| 17 | +``` |
| 18 | + |
| 19 | +## What is NOT tracked |
| 20 | + |
| 21 | +Heavy intermediate checkpoints stay out of git (`.set`, `.fdt`, `.bdf`, `.mat`, plus the `_bids_import_scratch/` directory). To regenerate them, see the reproduce section below. |
| 22 | + |
| 23 | +``` |
| 24 | +sub-<ID>/eeg/sub-<ID>_task-ThePresent_desc-clean_eeg.set (ignored) |
| 25 | +sub-<ID>/eeg/sub-<ID>_task-ThePresent_desc-clean_eeg.fdt (ignored) |
| 26 | +_bids_import_scratch/ (ignored) |
| 27 | +``` |
| 28 | + |
| 29 | +## Subjects in this run |
| 30 | + |
| 31 | +| Participant | Channels before | Channels after | Channels rejected | srate | |
| 32 | +| ---------------- | --------------- | -------------- | ----------------------------------------------------- | ----- | |
| 33 | +| sub-NDARAA948VFH | 129 | 123 | 6 (E7, E15, E48, E67, E80, Cz) | 100 | |
| 34 | +| sub-NDARAC853DTE | 129 | 112 | 17 (E7, E31, E32, E43, E48, E55, E67, E68, E73, E80, E105, E106, E112, E113, E119, E127, Cz) | 100 | |
| 35 | +| sub-NDARAD774HAZ | 129 | 98 | 31 (E2, E4, E6, E7, E13, E20, E24, E26, E30, E31, E32, E38, E39, E43, E48, E55, E64, E68, E73, E74, E80, E87, E95, E99, E105, E106, E112, E113, E119, E127, Cz) | 100 | |
| 36 | + |
| 37 | +All 3 match the original Stage B counts (6 / 17 / 31) recorded in `.context/plan.md` on 2026-04-21. `Cz` is rejected in every subject because it is the dataset reference and is flat by construction (`clean_rawdata` correctly catches it; documented in `.context/scratch_history.md`). |
| 38 | + |
| 39 | +## Parameters |
| 40 | + |
| 41 | +Pinned at the values locked in `.context/ideas.md` and `.context/research.md`: |
| 42 | + |
| 43 | +| Parameter | Value | |
| 44 | +| -------------------- | ---------------------------------------------------- | |
| 45 | +| Task | `ThePresent` | |
| 46 | +| BIDS root | `/Volumes/S1/Datasets/HBN/L100/R3_L100_bdf` | |
| 47 | +| High-pass filter | 1 Hz (FIR, transition band 1 Hz, passband edge 1 Hz) | |
| 48 | +| Cleanline | gated, skipped at 100 Hz (Nyquist = 50 Hz) | |
| 49 | +| ChannelCriterion | 0.8 (clean_rawdata) | |
| 50 | +| LineNoiseCriterion | 5 (clean_rawdata; ignored since cleanline gated) | |
| 51 | +| ASR / interpolation | OFF (channel-level rejection only this phase) | |
| 52 | + |
| 53 | +See `params.json` for the canonical snapshot plus MATLAB / EEGLAB versions, git SHA, and ISO timestamp. |
| 54 | + |
| 55 | +## Reproduce |
| 56 | + |
| 57 | +```bash |
| 58 | +# From the repo root, with the phase1-rerun branch checked out |
| 59 | +matlab -batch "run('scripts/run_phase1_three_subjects.m')" |
| 60 | +``` |
| 61 | + |
| 62 | +The runner script anchors all paths to its own location so MATLAB's `run()` chdir does not break `addpath`. EEGLAB is expected at `/Users/yahya/Documents/git/eeg/eeglab`. Wall-time on the local 100 Hz tier: ~3 minutes total for 3 subjects (excluding BIDS import scratch, which is cached after the first run). |
| 63 | + |
| 64 | +## Per-phase QA review |
| 65 | + |
| 66 | +The `eeg-qa-neuroscientist` agent (`.claude/agents/eeg-qa-neuroscientist.md`) reviews these figures before the PR opens. Findings live in the PR description, not here. |
0 commit comments