Repository navigation
Description
[Release readiness] Stream 8: ICLabel, component properties, DIPFIT
Context
This issue is one of 11 release-readiness streams for sccn/eegprep. The release goal is EEGLAB parity in the GUI and the numbers for everything except STUDY and third-party plugins (default / bundled plugins only: EEG-BIDS, ICLabel, clean_rawdata, dipfit, firfilt).
The audit (report eegprep_GUI_audit_2026-11-05.pdf, findings F1–F126 in findings.md) was run as a simulated user: hands-on GUI use of eegprep and EEGLAB side by side, with real datasets, plus numerical parity checks against MATLAB EEGLAB. EEGLAB was the pinned tree eeglab-8ac485f6 on the lab MATLAB machine (jamming, path ~/gui-parity/eeglab-8ac485f6), never modified. eegprep was develop at 0bda20da. Where the pinned tree lacked a plugin (Biosig, Fileio, neuroscanio, bva-io, Fieldtrip-lite, viewprops), comparisons against a bench copy are labelled non-pinned.
Of 144 in-scope menu items, 141 were tested hands-on in both GUIs. Not counted in that 141: Quit (not run, ends the session) and the two eegprep-only Plot items "View extended channel/component properties" (pinned EEGLAB has no viewprops; tested in eegprep only as F122).
This stream: ICA plugins: ICLabel, component properties, DIPFIT (size L). Findings assigned: F53, F55, F56, F57, F65, F75, F113, F114, F115, F116, F117, F118, F122.
Files / functions owned (do not edit outside these without coordinating; see fix_streams.md):
plugins/ICLabel/* (pop_viewprops, pop_prop_extended, _prop_browser, pop_iclabel, pop_icflag); popfunc/pop_prop.py; plugins/dipfit/* (_utils.py, pop_dipfit_settings.py, _fieldtrip_workflows.py, pop_dipplot.py, templates under resources); menu_actions.py: _run_dipfit_function (1473-1529)
Dependencies / merge order: Rebase after S7 if S7's history change touches these tests. F53 needs a dependency change in pyproject.toml/uv.lock, which S9 also edits: merge S9 first, or land the pyproject edit in one of them only.
Suggested tests from the stream plan: Function tests for coarse fit/autofit/leadfield with the shipped template; Qt test that viewprops windows are shown. ICLabel parity exists already. DIPFIT parity needs Fieldtrip-lite on jamming (not in the pinned tree): either add it there or keep to function tests.
Common datasets used in the audit (copies only; never the originals):
eeglab_data.set— continuous tutorial (32 ch, 128 Hz, 30504 pnts)eeglab_data_epochs_ica.set— epoched + ICA (80 epochs)eeglab_data_numerical_events.set— numerical event types- BrainVision set (
testbva.vhdr/ related) — 32 ch, 2112 pnts, 17 events test.bdf/test.edf— Biosemi / EDF samples- BIDS oddball sample for import/export
- Neuroscan
.EEG, BVA.mat, MFF folder, HDF5eeglab_data_hdf5.setwhere noted - Channel location files:
eeglab_chan32.locs,standard_1005.elc,standard-10-5-cap385.elp
Companion stream issues (together they cover F1–F126):
| Stream | Issue |
|---|---|
| 1 Data safety | #546 |
| 2 Dialogs and Edit selection | #548 |
| 3 Scroll window | #547 |
| 4 Signal processing | #549 |
| 5 Channel locations and re-reference | #550 |
| 6 Rejection numbers | #551 |
| 7 Plots and plot history | #552 |
| 8 ICLabel, component properties, DIPFIT | #553 |
| 9 Importers | #554 |
| 10 Export and BIDS | #555 |
| 11 Main window, menus, preferences, help | #556 |
Screenshots: image files for this stream are staged under
/workspace/gui-parity/issues/stream-08/and ready forgh issue edit --attach. Embedding via--attachfailed with the current fine-grainedGH_TOKEN(HTTP 403 onuploads.github.com). Runattach_screenshots.shwith a classic PAT that can upload user-attachments (or grant the fine-grained token Contents + attachments). Until then, screenshot filenames are listed under each finding.
Findings
Use the checkboxes to track progress. Full audit detail is carried over (not summarised away).
- [ ] F53 — high — Tools > Classify components using ICLabel
Finding (full audit text): Fails on the default install: needs PyTorch (pip install "eegprep[torch]"). Message is clear, but a default Tools item is dead for a fresh user. After installing torch, labels/flag match EEGLAB (argmax identical, flag [3 11] both).
Evidence / screenshots: F53_eegprep_20261105_012056.png, F53_eegprep_20261105_012046.png
What needs fixing: Resolve the behaviour so eegprep matches EEGLAB for this item (GUI and numbers), unless EEGLAB is the buggy side — then keep the correct behaviour, document the difference, and lock it with a test. Add a regression test. Keep existing tolerances.
Screenshots (filenames; attach pending):
F53_eegprep_20261105_012046.png— F53: eegprepF53_eegprep_20261105_012056.png— F53: eegprep
- [ ] F55 — medium — Tools > Classify components > Flag components
Finding (full audit text): History records EEG = pop_icflag(EEG, thresholds=[None None; 0.9 1; ...]); — neither Python nor MATLAB, cannot be replayed.
Evidence / screenshots: F55_eegprep_icflag_history.png
What needs fixing: Resolve the behaviour so eegprep matches EEGLAB for this item (GUI and numbers), unless EEGLAB is the buggy side — then keep the correct behaviour, document the difference, and lock it with a test. Add a regression test. Keep existing tolerances.
Screenshots (filenames; attach pending):
F55_eegprep_icflag_history.png— F55: eegprep
- [ ] F56 — high — Tools > Inspect/label components (viewprops), DIPFIT fine fit, dipplot
Finding (full audit text): Crash "The truth value of an empty array is ambiguous" at dipfit/_utils.py:168 (EEG.get("dipfit") or {} on a numpy array).
Evidence / screenshots: F56_eegprep_viewprops_pruned.png
What needs fixing: Resolve the behaviour so eegprep matches EEGLAB for this item (GUI and numbers), unless EEGLAB is the buggy side — then keep the correct behaviour, document the difference, and lock it with a test. Add a regression test. Keep existing tolerances.
Screenshots (filenames; attach pending):
F56_eegprep_viewprops_pruned.png— F56: eegprep
- [ ] F57 — high — viewprops / component property figure
Finding (full audit text): Even when forced past F56, the property figure is built but never shown. EEGLAB shows the full properties window (topo, ERPimage, spectrum, ICLabel bars).
Evidence / screenshots: F57_eegprep_viewprops_nowindow.png, F57_eeglab_viewprops_shown_20261105_020230.png
What needs fixing: Resolve the behaviour so eegprep matches EEGLAB for this item (GUI and numbers), unless EEGLAB is the buggy side — then keep the correct behaviour, document the difference, and lock it with a test. Add a regression test. Keep existing tolerances.
Screenshots (filenames; attach pending):
F57_eeglab_viewprops_shown_20261105_020230.png— F57: EEGLABF57_eegprep_viewprops_nowindow.png— F57: eegprep
- [ ] F65 — medium — Tools > Source localization using DIPFIT > Head model and settings
Finding (full audit text): eegprep opens with "Custom files/structures" selected, all Browse/Co-register/"..." buttons disabled and every file field empty; choosing "Template Boundary Element Model (MNI)" leaves the head model/MRI/landmark fields empty (EEGLAB normally fills the template paths). EEGLAB side could not be shown: the pinned EEGLAB lacks Fieldtrip-lite ("Cannot find Fieldtrip-lite extension"), so DIPFIT has no dialog or numerical comparison here.
Evidence / screenshots: F65_eegprep_dipfit_settings_20261105_021723.png, F65_eegprep_dipfit_bem_20261105_021730.png, F65_eeglab_dipfit_no_fieldtrip.png
What needs fixing: Resolve the behaviour so eegprep matches EEGLAB for this item (GUI and numbers), unless EEGLAB is the buggy side — then keep the correct behaviour, document the difference, and lock it with a test. Add a regression test. Keep existing tolerances.
Screenshots (filenames; attach pending):
F65_eeglab_dipfit_no_fieldtrip.png— F65: EEGLABF65_eegprep_dipfit_bem_20261105_021730.png— F65: eegprepF65_eegprep_dipfit_settings_20261105_021723.png— F65: eegprep
- [ ] F75 — medium — Plot > View extended channel/component properties
Finding (full audit text): vpchan builds the figure hidden (never shown) with a collapsed labels-only layout; same root as F57. vpcomp on a no-ICA dataset is a silent no-op.
Evidence / screenshots: F75_eegprep_vpchan_hidden.png, F75_eegprep_vpcomp_noica_silent.png
What needs fixing: Resolve the behaviour so eegprep matches EEGLAB for this item (GUI and numbers), unless EEGLAB is the buggy side — then keep the correct behaviour, document the difference, and lock it with a test. Add a regression test. Keep existing tolerances.
Screenshots (filenames; attach pending):
F75_eegprep_vpchan_hidden.png— F75: eegprepF75_eegprep_vpcomp_noica_silent.png— F75: eegprep
- [ ] F113 — medium (DIPFIT limit) — Tools > Source localization (DIPFIT) > Head model and settings / MRI
Finding (full audit text): eegprep shows only an MRI head-model dialog and ships only standard_mri_mni.npz, with no template volume conductor (root of F65). The pinned EEGLAB can't open any DIPFIT menu: 'Fieldtrip-lite extension is not installed. Download?', and No gives an error. Limit: DIPFIT numeric parity can't be checked without Fieldtrip-lite.
Evidence / screenshots: F113_dipfit_sbs.png, F113dipfit_dlg_eeglab_20261105_052716.png, F113dipfit_after_no_eeglab_20261105_052741.png, P_F113dipmri_dlg_eegprep_20261105_050412.png, F113dipmri_eegprep_20261105_050415.png
What needs fixing: Resolve the behaviour so eegprep matches EEGLAB for this item (GUI and numbers), unless EEGLAB is the buggy side — then keep the correct behaviour, document the difference, and lock it with a test. Add a regression test. Keep existing tolerances.
Screenshots (filenames; attach pending):
F113_dipfit_sbs.png— F113: EEGLAB vs eegprep side-by-sideP_F113dipfit_dlg_eeglab_20261105_052643.png— F113: EEGLABF113dipfit_after_no_eeglab_20261105_052741.png— F113: EEGLABF113dipfit_dlg_eeglab_20261105_052716.png— F113: EEGLABP_F113dipmri_dlg_eegprep_20261105_050412.png— F113: eegprep
- [ ] F114 — medium — DIPFIT > Settings / Coarse fit
Finding (full audit text): Settings defaults to MNI with no hdmfile; EEGLAB defaults to the BESA sphere and asks for co-registration or 'No Co-Reg'. The history is Python-kwarg form, and the coarse-fit history expands linspace into literal arrays. Without a template, the coarse fit fails with 'volume conductor model not specified'. With a scripted dipfit.vol (4-shell sphere), coarse fit on components 1:3 works.
Evidence / screenshots: F114_dipset_sbs.png, P_F114dipset_dlg_eegprep_20261105_050501.png, P_F114dipset_eegprep_20261105_050512.png, P_F114dipset_dlg_eeglab_20261105_053036.png, P_F114dipset_eeglab_20261105_053055.png, F114dipgrid_eegprep_20261105_050423.png, F114dipgrid_res_eegprep_20261105_050724.png
What needs fixing: Resolve the behaviour so eegprep matches EEGLAB for this item (GUI and numbers), unless EEGLAB is the buggy side — then keep the correct behaviour, document the difference, and lock it with a test. Add a regression test. Keep existing tolerances.
Screenshots (filenames; attach pending):
F114_dipset_sbs.png— F114: EEGLAB vs eegprep side-by-sideP_F114dipset_dlg_eeglab_20261105_053036.png— F114: EEGLABP_F114dipset_eeglab_20261105_053055.png— F114: EEGLABP_F114dipgrid2_dlg_eegprep_20261105_050532.png— F114: eegprepP_F114dipgrid3_dlg_eegprep_20261105_050620.png— F114: eegprep
- [ ] F115 — medium — DIPFIT > Autofit
Finding (full audit text): Fails without a template volume conductor. With the scripted vol, autofit 1:3 works; the history is Python kwargs.
Evidence / screenshots: P_F115dipauto_dlg_eegprep_20261105_050428.png, F115dipauto_eegprep_20261105_050431.png, F115dipauto_res_eegprep_20261105_050815.png, F115dipauto2_res_eegprep_20261105_050909.png
What needs fixing: Resolve the behaviour so eegprep matches EEGLAB for this item (GUI and numbers), unless EEGLAB is the buggy side — then keep the correct behaviour, document the difference, and lock it with a test. Add a regression test. Keep existing tolerances.
Screenshots (filenames; attach pending):
P_F115dipauto2_dlg_eegprep_20261105_050538.png— F115: eegprepP_F115dipauto2_dlg_eegprep_20261105_050825.png— F115: eegprepP_F115dipauto3_dlg_eegprep_20261105_050626.png— F115: eegprepP_F115dipauto_dlg_eegprep_20261105_050428.png— F115: eegprepP_F115dipauto_dlg_eegprep_20261105_050734.png— F115: eegprep
- [ ] F116 — medium — DIPFIT > Leadfield matrix
Finding (full audit text): The default LORETA-KEY gives 'sourcemodel is required'; no default source model is shipped.
Evidence / screenshots: P_F116diplf_dlg_eegprep_20261105_050436.png, F116diplf_eegprep_20261105_050439.png, F116diplf_res_eegprep_20261105_050946.png
What needs fixing: Resolve the behaviour so eegprep matches EEGLAB for this item (GUI and numbers), unless EEGLAB is the buggy side — then keep the correct behaviour, document the difference, and lock it with a test. Add a regression test. Keep existing tolerances.
Screenshots (filenames; attach pending):
P_F116diplf3_dlg_eegprep_20261105_050633.png— F116: eegprepP_F116diplf_dlg_eegprep_20261105_050436.png— F116: eegprepP_F116diplf_dlg_eegprep_20261105_050918.png— F116: eegprepF116diplf3_dlg_eegprep_20261105_050636.png— F116: eegprepF116diplf_eegprep_20261105_050439.png— F116: eegprep
- [ ] F117 — low — DIPFIT > Loreta
Finding (full audit text): Gives 'compute Leadfield first' (follows from F116); no route to a result.
Evidence / screenshots: P_F117diplor_dlg_eegprep_20261105_050443.png, F117diplor_eegprep_20261105_050447.png, F117diplor_res_eegprep_20261105_050959.png
What needs fixing: Resolve the behaviour so eegprep matches EEGLAB for this item (GUI and numbers), unless EEGLAB is the buggy side — then keep the correct behaviour, document the difference, and lock it with a test. Add a regression test. Keep existing tolerances.
Screenshots (filenames; attach pending):
P_F117diplor2_dlg_eegprep_20261105_050545.png— F117: eegprepP_F117diplor3_dlg_eegprep_20261105_050640.png— F117: eegprepP_F117diplor_dlg_eegprep_20261105_050443.png— F117: eegprepP_F117diplor_dlg_eegprep_20261105_050955.png— F117: eegprepF117diplor2_eegprep_20261105_050548.png— F117: eegprep
- [ ] F118 — medium — DIPFIT > Autofit + Plot / Plot component dipoles
Finding (full audit text): The default plot options give 'Plot options must be key/value pairs', so the dipole plot never appears.
Evidence / screenshots: F118multifitplot_err_eegprep_20261105_050821.png
What needs fixing: Resolve the behaviour so eegprep matches EEGLAB for this item (GUI and numbers), unless EEGLAB is the buggy side — then keep the correct behaviour, document the difference, and lock it with a test. Add a regression test. Keep existing tolerances.
Screenshots (filenames; attach pending):
F118multifitplot_err_eegprep_20261105_050821.png— F118: eegprep
- [ ] F122 — medium — Plot > View extended channel / component properties
Finding (full audit text): Extended channel properties draws nothing (no figure). Extended component properties shows only a topomap grid, and clicking a map doesn't open the per-component properties window. The pinned EEGLAB has no viewprops, so there is no pinned EEGLAB counterpart (eegprep-only menu items; compare F75/F57).
Evidence / screenshots: P_F122extchan_dlg_eegprep_20261105_051613.png, F122extchan_res_eegprep_20261105_051646.png, F122extcomp_res_eegprep_20261105_051709.png, F122extcomp_click_eegprep_20261105_051734.png
What needs fixing: Resolve the behaviour so eegprep matches EEGLAB for this item (GUI and numbers), unless EEGLAB is the buggy side — then keep the correct behaviour, document the difference, and lock it with a test. Add a regression test. Keep existing tolerances.
Screenshots (filenames; attach pending):
P_F122extchan_dlg_eegprep_20261105_051613.png— F122: eegprepP_F122extcomp_dlg_eegprep_20261105_051620.png— F122: eegprepP_F122extcomp_dlg_eegprep_20261105_051650.png— F122: eegprepF122extchan_dlg_eegprep_20261105_051616.png— F122: eegprepF122extchan_res_eegprep_20261105_051646.png— F122: eegprep
- [ ] F6 — low — Plot menu (no eegprep code fix expected)
Audit note: eegprep adds Plot > View extended channel/component properties; EEGLAB d0963be9 has it only under Tools (ICLabel)
Disposition: Intentional extra: the properties items under Plot are an eegprep addition (their function is covered by F122)
What counts as done: Confirm the disposition still holds on current develop. If this was an intentional difference or EEGLAB-only bug, add or keep a short documented note / test so it cannot regress into a silent mismatch. If it was a pass, re-verify once related findings in this stream are fixed. Screenshots named in the audit evidence: menu TSV diff
Definition of done
- Every finding checkbox in this issue is fixed (or explicitly documented as intentional / EEGLAB-only with a locked test).
- A regression test exists for each finding (Qt offscreen and/or function test as appropriate for the stream).
- Where numbers are involved: a numerical parity test against pinned EEGLAB
eeglab-8ac485f6on jamming. Do not loosen any existing tolerance — only Suraj or Arno may change tolerances; fix root causes instead. - Where EEGLAB itself is buggy: eegprep does the right thing; the difference is documented and locked with a test (documented-difference style).
- Error messages state what is wrong, which function hit it, and the exact fix (e.g. the
pip install eegprep[...]command). - No code comments that restate code or justify workarounds.
- Changelog entry for the stream.
- One PR against
develop, CI green (ignore the known-broken Claudereviewcheck). - Before merge, retest the same way as the audit: each finding's GUI flow is re-run hands-on in both eegprep and EEGLAB side by side, with before/after screenshots, plus the MATLAB parity / reference checks where this stream requires them; post the results on the PR.
- Merging requires Suraj's explicit approval (squash merge).
Dependencies and overlaps
Rebase after S7 if S7's history change touches these tests. F53 needs a dependency change in pyproject.toml/uv.lock, which S9 also edits: merge S9 first, or land the pyproject edit in one of them only.
Shared hotspots (from fix_streams.md):
menu_actions.pyis split by method — only edit this stream's named methods.tests/eeglab_python_backend_xfails.pyandtests/parity_expected/: each stream adds/removes only its own entries.- Suggested merge order overall: S1 → S2/S9/S11 → S5; S7 → S8; S3/S4/S6/S10 independent.
References
-
Audit PDF:
eegprep_GUI_audit_2026-11-05.pdf(Suraj / Arno) -
Findings log:
findings.md(F1–F126) -
Stream plan:
fix_streams.md -
Pinned EEGLAB:
eeglab-8ac485f6
Activity
suraj-ranganath commentedon Nov 18, 2026
Fixed by #591, which adds the remaining DIPFIT dialogs, component properties, and a LORETA-KEY leadfield comparison against FieldTrip. The MNI boundary-element work landed earlier in #610.
arnodelorme commentedon Dec 1, 2026
🤖 The pop_icflag dialog and native jamming captures are tracked in #957.
arnodelorme commentedon Dec 1, 2026
🤖 The pop_dipfit_loreta dialog and native jamming captures are tracked in #990.
arnodelorme commentedon Dec 1, 2026
🤖 The pop_multifit dialog and native jamming captures are tracked in #993.
arnodelorme commentedon Dec 1, 2026
🤖 The pop_dipplot dialog and native jamming captures are tracked in #995.
arnodelorme commentedon Dec 1, 2026
🤖 The pop_leadfield dialog and native jamming captures are tracked in #1000.