Repository navigation
Closed
Labels
phaseEpic implementation phase
Description
🤖 Phase issue for the EEGLAB completion epic.
Goal
Complete parity for ICA-adjacent component workflows, automated rejection workflows, ICLabel/viewprops, and bundled DIPFIT menu surfaces.
Target branch and PR flow
- Create the phase branch from
feature/eeglab-completion. - Open the phase PR back into
feature/eeglab-completion. - The phase PR should close this issue.
Parallelization
Can run in parallel with Phases 1 and 4. Final DIPFIT/component plotting checks depend on Phase 4 plot primitives.
In scope
- Component selection/removal and component metadata updates.
- ICLabel flagging and viewprops-style user workflows.
- Automated channel/epoch/ICA rejection methods that do not require EEGBrowser.
- Rejection mark superposition and ICA threshold/statistical rejection.
- Bundled DIPFIT source-localization menu workflows represented in the vendored EEGLAB tree.
pop_runicaparity hardening, including numerical stability and history replay.
Out of scope
- Browser-only visual scrolling rejection.
- External source-localization/plugin packages not vendored or packageable in EEGPrep.
Acceptance criteria
- Rejection and component workflows match EEGLAB for data/component modes, including marked epochs/components and history strings.
pop_runicavariants remain numerically stable and parity-tested; AMICA/Picard paths are handled according to existing EEGPrep support.- Browser-only visual scrolling rejection stays excluded rather than half-implemented.
- ICLabel and DIPFIT menu actions either perform real workflows or show a deliberately scoped missing-dependency message only where EEGLAB requires unavailable external assets.
- GUI and console flows support mixed use: GUI action, inspect
EEG/LASTCOM, then console action and GUI refresh. - Required lint/type/test commands pass.
/goal prompt
/goal Complete EEGPrep parity for ICA-adjacent component workflows, automated rejection, ICLabel/viewprops, and bundled DIPFIT menus, excluding EEGBrowser scrolling viewers. Verify against EEGLAB source and MATLAB outputs, add unit/integration/visual/console tests with sample_data, preserve numerical stability and history replay, run required lint/type/test commands, and repeat review/fix cycles until the phase is mergeable into the epic branch.
Metadata
Metadata
Assignees
Labels
phaseEpic implementation phase
Activity
claude commentedon May 27, 2026
🤖 # Research
Phase 3 is a multi-subsystem epic spanning ~20 user-facing actions across
popfunc,plugins/ICLabel, andplugins/dipfit. Current EEGPrep coverage is partial for ICA/ICLabel, near-zero for automated rejection, and empty for DIPFIT. Most Phase 3 menu actions are declared in the EEGLAB menu tree but routed through the placeholder registry; they show but do not execute.Existing coverage:
src/eegprep/functions/popfunc/pop_runica.py(572 lines) andeeg_runica.py,eeg_amica.py,eeg_picard.pyare in place with tests (test_runica.py,test_eeg_runica.py,test_eeg_amica.py,test_eeg_picard.py,test_runamica.py,test_gui_pop_runica.py). Phase work is parity hardening, not a port.src/eegprep/functions/popfunc/pop_subcomp.py(118 lines) implements component removal usingEEG['reject']['gcompreject'].src/eegprep/plugins/ICLabel/pop_iclabel.py(79 lines) andeeg_icflag.py(87 lines) handle classification + the underlying flag write intoEEG['reject']['gcompreject'].Missing / placeholder (declared in
src/eegprep/functions/guifunc/menu_placeholders.py):pop_selectcomps,pop_prop,pop_icflag(wrapper around existingeeg_icflag),pop_viewprops.pop_rejchan,pop_rejcont,pop_eegthresh,pop_jointprob,pop_rejkurt,pop_rejtrend,pop_rejspec,eeg_rejsuperpose,pop_rejmenu,pop_rejepoch,pop_autorej,pop_signalstat.src/eegprep/plugins/dipfit/is a stub (__init__.pyis one line; only amenu.pyexists). All actions (pop_dipfit_settings,pop_dipfit_headmodel,pop_dipfit_gridsearch,pop_dipfit_nonlinear,pop_dipplot,pop_multifit,pop_leadfield,pop_dipfit_loreta) need ports.Relevant code
src/eegprep/functions/guifunc/menu_placeholders.py— registry of unported actions; canonical Phase 3 work listsrc/eegprep/functions/guifunc/eeglab_menu.py#L160-L212— Tools menu (ICA, reject, component) where dispatch livessrc/eegprep/plugins/ICLabel/menu.py— ICLabel submenu wiring forpop_iclabel,pop_icflag,pop_viewpropssrc/eegprep/plugins/dipfit/menu.pyandsrc/eegprep/plugins/dipfit/__init__.py— empty DIPFIT pluginsrc/eegprep/plugins/ICLabel/eeg_icflag.py#L83-L84— sole writer ofEEG['reject']['gcompreject']; rejection schema conventionNote:
src/eegprep/eeglab/is empty in this checkout. Parity work needs the EEGLAB submodule populated (or upstreamsccn/eeglabconsulted) before each PR.Proposed Approach
This phase is far too large for a single PR (estimated several thousand LOC across 4+ subsystems). It should be decomposed into independent PRs that each merge into
feature/eeglab-completion. Recommended ordering, sized to <500 LOC where practical:pop_icflag(thin wrapper over existingeeg_icflag),pop_viewprops:components,pop_viewprops:channels. Reuses existing ICLabel infrastructure.pop_selectcomps(interactive component map grid) andpop_prop(single-component property viewer). GUI-heavy; useseeglab-gui-visual-parityskill.pop_rejchan(statistics-based) andpop_rejcont(continuous-data segment rejection). Both are algorithmic, light GUI.pop_eegthresh,pop_jointprob,pop_rejkurt,pop_rejtrend,pop_rejspec, pluseeg_rejsuperpose. These share theEEG.reject.*schema and can ship together (~one PR) since they are small, parallel implementations sharing tests.pop_rejmenu,pop_rejepoch,pop_autorej. Depends on (5).pop_dipfit_settings,pop_dipfit_headmodel. Bootstraps the plugin and bundled MNI/BEM resources.pop_dipfit_gridsearch,pop_dipfit_nonlinear,pop_multifit. Depends on (7).pop_dipplot,pop_leadfield,pop_dipfit_loreta. Depends on Phase 4 plot primitives per the issue.feature/eeglab-completiononce 1–9 land, with side-by-side GUI parity attachments.Open questions for the issue owner before implementation begins:
feature/eeglab-completion?.matfiles, ~MB). Should those go intosrc/eegprep/resources/(package data) or be downloaded on demand?pop_selectcompsin EEGLAB renders an N×M grid of clickable topo maps. Should the EEGPrep port match that exactly via the visual-parity loop, or use a simpler list+detail Qt layout?src/eegprep/eeglab/is empty in this checkout — please confirm parity work will run against a populated submodule or against upstreamsccn/eeglabclones.Not opening a PR until these decisions land; the work is too large and design-sensitive to guess at intent.