Repository navigation
Closed
Labels
phaseEpic implementation phase
Description
🤖 Phase 6 completes ICLabel/viewprops and visual diagnostic workflows.
Summary
Round out ICLabel and viewprops as polished EEGPrep diagnostic tools: label statistics, component/channel property displays, scroll/ERP/spectrum/topography panels, network artifact decisions, and GUI parity for researchers inspecting components.
Scope
- Implement or classify
eeg_icalabelstatand related ICLabel summary/statistics behavior. - Complete viewprops/property display parity where EEGPrep currently uses simplified native replacements.
- Decide whether alternate ICLabel network artifacts are in scope; if not, document the supported packaged network clearly.
- Ensure
pop_viewprops,pop_prop_extended, ICLabel outputs, and browser-backed component workflows are visually useful and EEGLAB-familiar. - Add docs and help resources for ICLabel/viewprops workflows.
Acceptance Criteria
- Component diagnostic workflows are usable from GUI and console and match EEGLAB layout/labels/defaults where practical.
- ICLabel statistics match EEGLAB/MATLAB parity expectations where deterministic.
- Missing optional networks fail clearly or are documented as unsupported.
- Side-by-side visual parity evidence covers the main component-property flows.
- Tests cover sample data with ICA/ICLabel state, empty/missing ICA errors, history, and GUI/session sync.
Required References
AGENTS.mdsrc/eegprep/eeglab/plugins/ICLabel/src/eegprep/eeglab/plugins/ICLabel/viewprops/src/eegprep/plugins/ICLabel/.agents/skills/eegprep-feature-development/SKILL.md.agents/skills/eeglab-gui-visual-parity/SKILL.md.agents/skills/gui-agent-flow-qa/SKILL.md
/goal
/goal Complete EEGPrep ICLabel/viewprops diagnostic parity for the final standalone epic. Inspect EEGLAB ICLabel and viewprops source, implement label statistics and practical component/property displays with native EEGPrep GUI behavior, preserve console/history/session sync, add MATLAB parity where deterministic, sample_data ICA/ICLabel integration tests, side-by-side visual evidence, docs/help resources, ruff/format/ty, non-slow pytest, and pre-commit. Keep unsupported alternate network artifacts explicit rather than silently ignored.
Metadata
Metadata
Assignees
Labels
phaseEpic implementation phase
Activity
claude commentedon Jun 7, 2026
🤖 Plan:
Scope assessment
Phase 6 epic. Touches
src/eegprep/plugins/ICLabel/, viewprops/property-display flows, console/session sync, MATLAB parity, docs, and visual parity. Multi-module and well over 100 LOC — per the fix-issue routing rules I am posting analysis instead of opening a PR.Research
Current ICLabel surface is largely in place; remaining work is statistics, network-artifact decisions, and parity evidence, not greenfield porting.
Already implemented (sizes in
src/eegprep/plugins/ICLabel/):pop_iclabel.py(79) — exposesdefault|lite|betastrings; Python path ignores them and always loadsnetICL.mat. Only matlab/octave engine actually switches networks.pop_icflag.py(164),eeg_icflag.py(63) — flagging + threshold dialog.pop_viewprops.py(207) — chan/comp thumbnail overview + activity browser; dialog spec wired.pop_prop_extended.py(1376) — dashboard with topo / activity / ERPimage / spectrum / class probs / DIPFIT slices / accept/reject buttons.iclabel.py(106),iclabel_net.py(266),ICL_feature_extractor.py(105),eeg_rpsd.py,eeg_autocorr*.py.menu_placeholders.pylines 81-82, 128;menu_actions.pylines 1129-1283 (pop_iclabel/pop_icflag/pop_viewprops auto-run + history).tests/test_iclabel.py(71),test_iclabel_features.py(179),test_pop_prop_extended.py(182),test_gui_pop_iclabel.py(61),test_gui_pop_prop_extended.py(277),tests/compare_iclabel_engines.py.tools/visual_parity/cases.json:pop_iclabel_dialog(L1945),pop_icflag_dialog(L1970),pop_viewprops_dialog(L2160),iclabel_pop_prop_extended_dashboard(L2174).src/eegprep/resources/help/pop_viewprops.md,pop_prop_extended.md.Open gaps explicitly named by the audit (
.notes/eeglab-migration-gap-audit.mdL350-357):eeg_icalabelstat— not implemented or referenced anywhere (verified by grep).lite,beta) — advertised inpop_iclabel.pyL12, L34-36 but the Python branch (iclabel.pyL57-99) silently ignoresalgorithmand always loadsnetICL.mat. Either bundle the alternate weights, routelite/betato a clearNotImplementedErrorforengine=None, or remove them from the choice set.Relevant code
src/eegprep/plugins/ICLabel/pop_iclabel.py#L12-L42— advertised vs. honoredicversionsetsrc/eegprep/plugins/ICLabel/iclabel.py#L57-L99— Python branch ignoresalgorithmsrc/eegprep/plugins/ICLabel/pop_viewprops.py#L29-L75— chanorcomp/spec/erp/scroll flowsrc/eegprep/plugins/ICLabel/pop_prop_extended.py#L1-L120— dashboard data modelsrc/eegprep/functions/guifunc/menu_actions.py#L1129-L1283— GUI/console wiring.notes/eeglab-migration-gap-audit.md#L340-L357— declared remaining gapsProposed approach
Decompose into four small PRs against the epic branch
feature/eeglab-full-standalone-completion. Each can be reviewed independently.eeg_icalabelstatport + integration. Implementsrc/eegprep/plugins/ICLabel/eeg_icalabelstat.pyreturning per-class component counts, mean probability, and flagged-vs-kept tallies fromEEG.etc.ic_classification.ICLabel.classificationsandEEG.reject.gcompreject. Mirror the MATLAB return signature using a dict with EEGLAB-named keys. Add a console-friendly summary print path. Tests: deterministic input → known counts; missing classification → clear error; sample-data integration with ICA + ICLabel applied. MATLAB parity test gated byEEGPREP_SKIP_MATLAB. Help:src/eegprep/resources/help/eeg_icalabelstat.md. ~150-250 LOC + tests.Alternate network decision. Decide between (a) bundling
netICL_lite.mat/netICL_beta.mat, or (b) restrictingpop_iclabelPython engine todefaultand raising a clearNotImplementedErrorforlite|betaunlessengine in {"matlab","octave"}. Default recommendation: (b) — matches "fail clearly or document as unsupported" in the acceptance criteria. Update dialog spec, help text, parity matrix row. Tests: explicit error whenengine=None, icversion="lite"; matlab path still accepts all three (skipped without MATLAB). ~50 LOC + tests.viewprops/prop_extended visual parity completion. Run the four existing
cases.jsoncases throughtools/visual_parity/capture.py+compare.py, attach side-by-side images to the phase PR viagh attach --comment, and tune layout/labels/control order where diffs are large. Document any MATLAB-only widgets deliberately replaced with native Qt as classified gaps in.notes/eeglab-migration-gap-audit.md. No production-code churn unless a parity diff requires it.Docs + closeout. Add a "Component diagnostics" section to the Sphinx user guide describing
pop_iclabel→pop_icflag→pop_viewprops→pop_prop_extended→eeg_icalabelstatas one workflow, with the unsupported-network policy stated. Update parity matrix entries for ICLabel rows. Run./pre-commit.py --fix,EEGPREP_SKIP_MATLAB=1 uv run pytest -m "not slow", and the visual parity suite before opening the phase PR.Open questions for human review
lite,beta) — bundle weights or fail clearly? Recommendation: fail clearly; bundling adds ~30-60 MB resources most users will not need.eeg_icalabelstatreturn shape — match EEGLAB struct fields exactly (e.g.class_count,class_probmean) or use a Python dataclass? Recommendation: dict with EEGLAB-named keys for console parity.pop_prop_extendedalready covers scroll/ERP/spectrum/topography. Confirm no additional standalone diagnostic dialogs (e.g. separatepop_specview) are in-scope for this phase.Will not start coding until at least Q1 and Q2 are answered.
suraj-ranganath commentedon Jun 7, 2026
🤖 # Research
No open PR currently overlaps #163. EEGPrep already has native
pop_iclabel,pop_icflag,pop_viewprops, andpop_prop_extendedsurfaces; the remaining Phase 6 gaps are the missingeeg_icalabelstatpublic helper, standalone Pythonlite/betaICLabel network requests being silently treated as default, and final docs/matrix/evidence for the viewprops diagnostic workflow.Relevant code
src/eegprep/eeglab/plugins/ICLabel/eeg_icalabelstat.m- MATLAB stats oraclesrc/eegprep/plugins/ICLabel/iclabel.py- Python network loading policysrc/eegprep/plugins/ICLabel/pop_iclabel.py- version dialog/historysrc/eegprep/plugins/ICLabel/pop_viewprops.py- overview/browser workflowsrc/eegprep/plugins/ICLabel/pop_prop_extended.py- diagnostic dashboardProposed Fix
Implement
eeg_icalabelstatas an EEGPrep-owned public helper that preserves EEGLAB threshold counts and prints the familiar class summary while returning structured Python statistics. Make standalone Python ICLabel accept only the packaged defaultnetICL.mat;liteandbetaremain explicit MATLAB/Octave passthrough choices and raise a clear standalone limitation. Update focused tests, sample-data ICLabel-state coverage, help/API/user-guide docs, final parity matrix rows, implementation notes, and visual parity evidence before opening a PR tofeature/eeglab-full-standalone-completionwithCloses #163.suraj-ranganath commentedon Jun 7, 2026
🤖 Implemented in PR #167: #167
Added standalone
eeg_icalabelstat, explicit default-only Python ICLabel network handling, ICLabel/viewprops docs/help, final parity matrix closeout, focused sample-data and GUI tests, Computer Use GUI flow QA, and attached visual parity evidence to the PR. Local verification passed: focused ICLabel/viewprops tests, final matrix validator, visual parity metadata tests, docs build, ruff, format, ty, staged pre-commit, andEEGPREP_SKIP_MATLAB=1 uv run --no-sync pytest -m "not slow". PR checkClaude PR Review / reviewcompleted successfully.suraj-ranganath commentedon Jun 7, 2026
🤖 Phase PR for this issue has merged into feature/eeglab-full-standalone-completion and integration checks are passing on the epic branch. Closing this phase issue as completed.
arnodelorme commentedon Dec 1, 2026
🤖 The pop_viewprops dialog and native jamming captures are tracked in #961.