Skip to content

Phase 1: BIDS import and preprocessing pipeline (R3-mini)#12

Open
MinaNourhashemi wants to merge 3 commits into
OpenScience-Collective:mainfrom
MinaNourhashemi:feature/issue-11-phase1-preprocess
Open

Phase 1: BIDS import and preprocessing pipeline (R3-mini)#12
MinaNourhashemi wants to merge 3 commits into
OpenScience-Collective:mainfrom
MinaNourhashemi:feature/issue-11-phase1-preprocess

Conversation

@MinaNourhashemi

Copy link
Copy Markdown

Closes #11. Part of #10.

Summary

  • Implements the Phase 1 HBN ERSP preprocessing pipeline targeting R3-mini (100 Hz, 20 subjects)
  • One MATLAB function per step; all callable from the command line via run_phase1('r3mini')
  • Full R3 blocked until this pipeline validates end-to-end on mini

Files

File Purpose
config/cfg_r3mini.m R3-mini paths and preprocessing parameters
phase1/p1_import_bids.m pop_importbids wrapper; outputs raw ALLEEG
phase1/p1_highpass.m 1 Hz FIR highpass via pop_eegfiltnew
phase1/p1_cleanline.m CleanLine at 60/120/180 Hz
phase1/p1_channel_reject.m clean_rawdata channel rejection only (ASR off)
phase1/run_phase1.m Master script; saves sets + phase1_report.mat

Deviations from reference pipeline (study_handy_scripts.m)

  • ASR disabled: BurstCriterion = 'off' and WindowCriterion = 'off'. The reference uses ASR defaults; this pipeline skips it because ASR modifies the continuous signal in ways that bias ICA decomposition (Phase 2). Channel-level rejection only.
  • Checkpoint save after import: raw sets written to derivatives/raw/ before filtering to allow recovery without re-running BIDS import.

Acceptance criteria status

  • All 6 files implemented with explicit parameter justification comments
  • run_phase1('r3mini') runs without error (blocked: R3-mini data not yet downloaded; validated by code review only)
  • Channel retention logged per subject; warn if <90%
  • derivatives/ in .gitignore (data never committed)
  • Deviations from reference pipeline documented above and in phase1/README.md

Test plan

  • Download R3-mini (20 subjects from s3://fcp-indi/data/Projects/HBN/BIDS_EEG/cmi_bids_R3)
  • Run matlab -nodisplay -nosplash -r "addpath(genpath('sessions/week-03/practicum')); run_phase1('r3mini'); exit"
  • Confirm all subjects produce *_preproc.set in derivatives/preproc/
  • Confirm all subjects retain >90% channels (128-channel HydroCel net)
  • Confirm phase1_report.mat saved with per-subject counts

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phase 1: BIDS import and preprocessing pipeline (R3-mini)

1 participant