Skip to content

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

@MinaNourhashemi

Description

@MinaNourhashemi

Sub-issue of #10.

Goal

Implement Phase 1 of the HBN ERSP practicum: import BIDS, preprocess, save cleaned EEG sets to derivatives/preproc/. Target: R3-mini only (100 Hz, 20 subjects). Full R3 blocked until pipeline is validated end-to-end on mini.

Pipeline steps (one MATLAB function per step)

Reference pipeline from study_handy_scripts.m:
pop_importbids → highpass 1 Hz → cleanline (60/120/180 Hz) → clean_rawdata (channel rejection only) → save

Functions to implement

File Purpose
config/cfg_r3mini.m R3-mini paths and parameters (data root, deriv root, task, channels)
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; callable from command line

Command-line usage (target)

matlab -nodisplay -nosplash \
  -r "addpath(genpath('sessions/week-03/practicum')); run_phase1('r3mini'); exit"

Deliverable

derivatives/preproc/<subject>_preproc.set for all R3-mini subjects, plus a console log of retained channel counts per subject.

Acceptance criteria

  • All 6 files implemented with explicit parameter justification comments
  • run_phase1('r3mini') runs without error on R3-mini data
  • Channel retention logged per subject (expect >90% channels kept)
  • derivatives/preproc/ listed in .gitignore (data not committed)
  • PR description documents any deviation from reference pipeline

Out of scope

  • Full R3 run
  • AMICA, IClabel, epoching (Phases 2-4)
  • CI/CD hooks (Week 4)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions