Skip to content

Commit 812a553

Browse files
Merge pull request #29 from OpenScience-Collective/feature/issue-2-phase1-rerun
phase1: re-run preprocessing for 3 subjects
2 parents 38c197f + 0171d2d commit 812a553

16 files changed

Lines changed: 130 additions & 0 deletions

derivatives/preproc/README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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.

derivatives/preproc/params.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"BidsRoot": "/Volumes/S1/Datasets/HBN/L100/R3_L100_bdf",
3+
"Task": "ThePresent",
4+
"OutDir": "derivatives/preproc",
5+
"Subjects": [],
6+
"HpfHz": 1,
7+
"RunCleanline": false,
8+
"LineNoiseHz": [
9+
60,
10+
120,
11+
180
12+
],
13+
"ChannelCriterion": 0.8,
14+
"LineNoiseCriterion": 5,
15+
"SmokeSubjectCount": 3,
16+
"n_subjects_eligible": 3,
17+
"n_subjects_ok": 3,
18+
"n_subjects_failed": 0,
19+
"n_subjects_missing_from_import": 0,
20+
"bids_import_scratch": "derivatives/preproc/_bids_import_scratch",
21+
"matlab_version": "25.2.0.3055257 (R2025b) Update 2",
22+
"eeglab_version": "dev",
23+
"git_sha": "d1471fef1dc241e38fd3cd7bfb7c43e638057e67",
24+
"timestamp_iso": "2026-05-13T05:16:15Z"
25+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
participant_id,status,n_channels_before,n_channels_after,rejected_channels,srate,cleanline_status,duration_s,error_message
2+
sub-NDARAA948VFH,ok,129,123,E7;E15;E48;E67;E80;Cz,100,skipped_nyquist,18.243,
3+
sub-NDARAC853DTE,ok,129,112,E7;E31;E32;E43;E48;E55;E67;E68;E73;E80;E105;E106;E112;E113;E119;E127;Cz,100,skipped_nyquist,7.389,
4+
sub-NDARAD774HAZ,ok,129,98,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,skipped_nyquist,6.771,
72.1 KB
Loading
63.7 KB
Loading
68.7 KB
Loading
125 KB
Loading
73 KB
Loading
63.9 KB
Loading
69.1 KB
Loading

0 commit comments

Comments
 (0)