Repository navigation
Description
Summary
Hands-on GUI audit of the Edit and Tools menus on Nov 23, 2026, done as a researcher would: real menu clicks in the eegprep Qt GUI next to the EEGLAB GUI on the same screen, the same real datasets in both, every result saved and compared (cmp.py: data, events, chanlocs, ICA). This issue collects every Edit and Tools finding (FAIL, MINOR, MISSING) plus the Nov 5 findings that are still open here (F47, F55, F56 partial, F57, F113, F114, F115 history, F117), so one PR can fix them together. File-menu findings are in the companion issue #673 (File/data I/O stream).
- eegprep:
developat6b8012cf2e1f7f1e336e963b77b464754393cbf3(re-checked withgit fetch origin developon Nov 23 11:05 PST: develop has not moved, so every file:line below is current) - EEGLAB: pinned tree
8ac485f6(Fieldtrip-lite, dipfit, firfilt, ICLabel, clean_rawdata from the pin; viewprops from the bench copy where noted) - Each finding was re-read from first principles against the EEGLAB source; where that changed or refined the audit's root cause, the refined cause is given.
- Already handled on develop, nothing to do beyond the GUI retest: F60 (EEGLAB
pop_interp.m:61discardst_range; eegprep keeps it, documented indocs/source/user_guide/preprocessing_pipeline.rst:337andchangelog.rst:703).
Datasets used
eeglab_data.setandeeglab_data_epochs_ica.setfromsample_data/;eeglab_chan32.locsandstandard-10-5-cap385.elpfrom EEGLABsample_data/andfunctions/supportfiles/.- Tools chain set (Session A):
eeglab_data.set-> readlocs -> Select data -> Basic FIR 1 Hz high-pass -> resample 100 Hz -> windowed-sinc 30 Hz -> firpm -> moving average -> reref average -> interp -> manual rejection -> clean_rawdata defaults (ml_clean.set, 30 ch x 23279) -> runica extended (ml_ica.set, 30 ICs) -> ICLabel -> flag eye 0.5 (comp 11) -> remove comp 11 -> extract epochssquare-1 2 (69 epochs x 300) -> rmbase. DIPFIT rows ran on the 69-epoch ICA set (unit-sphere tutorial chanlocs, 29 ICs). For a quick reproeeglab_data_epochs_ica.setshows the same DIPFIT behaviour (same unit-sphere locations).
Evidence (screenshots and saved sets from both tools) is on the bot box under /workspace/gui-parity/audit-20261123/ (screenshots/, epout/, mlout/, findings.md, items_final.json). File names are quoted per finding.
Separability with #673 (File/data I/O)
This stream owns: functions/guifunc/qt.py, the shared inputgui validation path, functions/popfunc/ Edit/Tools functions (pop_select, pop_editset, pop_editeventvals, pop_chanedit, plot_utils, pop_rmdat, pop_selectevent, pop_mergeset, pop_runica, pop_selectcomps, pop_prop, pop_subcomp), plugins/firfilt/, plugins/clean_rawdata/, plugins/ICLabel/, plugins/dipfit/, and Edit/Tools handlers in functions/guifunc/menu_actions.py. Edit > About this dataset (comments saved as one row) is fixed in pop_saveset, so it lives in #673 (item 27).
A. High and medium (FAIL / MISSING)
1. DIPFIT > Head model and settings: unscaled default transform, Co-register and channel picker disabled, wrong fits (FAIL, high; F113/F114)
- Repro: on the 69-epoch ICA set (or
eeglab_data_epochs_ica.set), Tools > Source localization using DIPFIT > Head model and settings, accept defaults, Ok; then Tools > ... > Component dipole autofit, components1:3, Ok. In EEGLAB do the same; EEGLAB refuses Ok, so reopen, Co-register, Warp montage, Pair channels Ok, coregister Ok, Ok. - eegprep now: opens on Template BEM (MNI) with file names filled (F65 fixed), but
Co-registerand the channel-omit...are always disabled and the matrix is prefilled with0 0 0 0 0 -1.5708 1 1 1. Ok accepts it silently, so unit-sphere positions are used as millimetres: autofit 1:3 gives RV 8% / 21% / 18% at [18 -78 54], [26 -11 77], [-55 -26 54]; EEGLAB gives 2.6% / 0.9% / 2.2% at [-6 -21 48], [-24 -76 22], [18 -65 21]. With EEGLAB's warp[0.49 -17.23 2.24 0.10 0.005 -1.574 98.2 90.5 98.6]typed in, eegprep gives exactly EEGLAB's dipoles (positions to 0.01 mm, RV to 4 digits), so the fit engine is right (screenshots/ep_dipset_dlg_20261123_091358.png,ml_dipset_ok_20261123_091427.png,ml_warp_20261123_091518.png,ml_warped_20261123_091609.png). - EEGLAB:
plugins/dipfit/pop_dipfit_settings.m:139callslookupchantemplate(chanfile, templates(valmodel).coord_transform)andfunctions/sigprocfunc/lookupchantemplate.m:50-62returnstransform = []when no keyword matches;:125-134then leaves the matrix empty;:581-587refuses Ok with "INCORRECT SETTINGS ... You must co-register your channel locations with the head model ... To bypass co-registration, check the checkbox No Co-Reg.";:238-239,267wire Co-register (coregister) and the channel picker (pop_chansel). - Root cause:
src/eegprep/plugins/dipfit/_utils.py:62gives each template a scalarcoord_transform(no EEGLAB counterpart:dipfitdefs.m:75-82holds only keyword-matched transforms), andpop_dipfit_settings.py:70-77falls back to it whenlookupchantemplatefinds nothing;pop_dipfit_settings.py:139and:143create Co-register and...withenabled=False;pop_dipfit_settings.py:173-176accepts an empty matrix without No Co-Reg. - Fix: drop the scalar fallback; leave the matrix empty when no template matches; refuse Ok with EEGLAB's message (naming
pop_dipfit_settings) unless a matrix is present or No Co-Reg is ticked; enable Co-register and wire it to the existingfunctions/guifunc/coregister.pydialog andfunctions/sigprocfunc/coregister.py(warp='auto'= Warp montage,alignfid); enable...withpop_chansel. Also supportcoord_transform='warpfiducials'|'alignfiducials'aspop_dipfit_settings.m:378-386. - Test: spec/GUI tests (empty matrix on tutorial locs, Ok refused, Co-register enabled); a parity test that Warp montage on the tutorial set reproduces EEGLAB's 9 parameters within the existing coregister parity tolerance, then autofit 1:3 equals EEGLAB's positions/RV (MATLAB script on jamming; reuse
tests/matlab/eegprep_coregister_parity.m). - No silent unscaled default; Ok refused like EEGLAB
- Co-register (Warp montage) and channel omit work from the dialog
- Autofit 1:3 after GUI co-registration matches EEGLAB
2. DIPFIT > Component dipole fine fit crashes after autofit (FAIL, high; F56 follow-up)
- Repro: after item 1's autofit 1:3, Tools > ... > Component dipole fine fit.
- eegprep now: error before the dialog:
pop_dipfit_nonlinear: float() argument must be a string or a real number, not list(screenshots/ep_dip_Component_dipole_fine_20261123_092101.png). The Nov 5 crash (F56,_utils.py:168) is gone; this is a new one. - EEGLAB: "Manual dipole fit -- pop_dipfit_nonlinear()" opens on component 1, RV 2.56%, position/moment rows, Fit / Plot buttons (
ml_dip_fine_20261123_092548.png). - Root cause:
src/eegprep/plugins/dipfit/pop_dipfit_nonlinear.py:161numeric_vector(model["posxyz"])gets the nested list[[x, y, z]]thatplugins/dipfit/dipfit_gridsearch.py:74stores (dip["pos"].tolist()of a (1, 3) array, kept throughpop_multifit;pop_multifit.py:169builds the same shape for pairs) andfunctions/miscfunc/value_parsing.py:70callsfloat()on the inner list. - Fix: store
posxyz/momxyzas(ndip, 3)float arrays everywhere (pop_multifit, gridsearch, nonlinear), as EEGLAB does (pop_multifit.m:172-184), and read them withnp.asarray(..., float).reshape(-1, 3)in the dialog. - Test: autofit then open fine fit through the renderer; dialog shows RV and the first dipole; Fit updates the model; same result as EEGLAB on component 1.
- Fine fit opens and fits after autofit
3. Edit > Select data on epoched data keeps 129 points (FAIL, medium; F44 partial)
- Repro: load
eeglab_data_epochs_ica.set, Edit > Select data, time range-0.5 0.5, epochs1:2:9, Ok, pop_newset Ok, save; compare with EEGLAB. - eegprep now: 8 events (F44 events fixed) but 129 points and xmax 0.5; EEGLAB has 128 points and xmax 0.4921875, so event latencies drift by 1 sample per epoch (max 4). Continuous selection is identical to EEGLAB (maxdiff 0, 36 events).
- EEGLAB:
functions/popfunc/pop_select.m:526-528callsepoch(EEG.data, alllatencies, [g.time(1) g.time(2)]*EEG.srate, ...);functions/sigprocfunc/epoch.m:106-107usesround(lim(1))..round(lim(2) - 1), a half-open window;pop_select.m:534-535sets xmin/xmax from the returned times. - Root cause:
src/eegprep/functions/popfunc/pop_select.py:391-398maps[tmin tmax]witheeg_lat2pointand keeps both end points. - Fix: for epoched data compute the kept samples as
epoch.mdoes (offsetsround(tmin*srate)..round(tmax*srate) - 1relative to time 0), setxmin/xmaxfrom them, and shift event latencies accordingly. - Test: epoched selection parity with EEGLAB (pnts 128, xmax 0.4921875, 8 events with EEGLAB latencies); edge cases tmin/tmax on and off the sample grid.
- Also: out-of-range time
60 100on 50 s data gives a clear message and keeps the dataset (EEGLAB corrects silently and continues); keep eegprep's behaviour, document it ineeglab_migration.rst, test it. The audit saw the Channel type...enabled; on developpop_select_dialog_specdisables it foreeglab_data.set(no types) and enables it foreeglab_data_epochs_ica.set(EEG/EOG types, wherepop_select.m:133enables it too), so only re-check this in the GUI retest. - 128 points and EEGLAB event latencies
- Out-of-range behaviour documented and tested
4. Tools > Filter the data > Parks-McClellan: Estimate gives order 66 where EEGLAB gives 54 (FAIL, medium)
- Repro: on the chain set (100 Hz), Tools > Filter the data > Parks-McClellan (equiripple) FIR filter, cutoff
40, transition4, lowpass, Estimate with ripple0.1dB and attenuation40dB. - eegprep now: weights match (1.7372 / 1), but order 66, so the data differ (maxdiff 1.7 uV). With 54 typed, eegprep equals EEGLAB exactly.
- EEGLAB:
plugins/firfilt/pop_firpmord.m:95calls MATLABfirpmord(Herrmann/Rabinerremlpordestimate);pop_firpm.m:181-183then rounds up to even withceil(forder/2)*2. Checked from first principles: edges[38 42]/50,dev = [0.0057564 0.01],remlpordgives L = 53.24,firpmordreturnsceil(L) - 1 = 53, the GUI shows 54. - Root cause:
src/eegprep/plugins/firfilt/pop_firpmord.py:55-59uses the Kaiser-window formula with the smallest deviation, and rounds to even insidepop_firpmord(EEGLAB rounds in the pop_firpm callback, so command-linepop_firpmordreturns 53). - Fix: port
firpmord/remlpord(2-band formulaD/df - fK*df + 1with the published coefficients; for multiband take the max over transitions asfirpmorddoes); returnceil(L) - 1; move the even rounding to the pop_firpm Estimate callback inqt.py. - Test:
pop_firpmord([0.76 0.84], [1 0], [0.0057564 0.01])returns 53; GUI Estimate shows 54; multiband case against MATLABfirpmordon jamming; pop_firpm output equals EEGLAB (maxdiff 0). - Order 54 in the GUI, 53 from the function, data equal
5. Tools > Inspect/label components by map: static grid, no pop_prop, no accept/reject (FAIL, medium; F56 partial, F57)
- Repro: load
ml_ica.set(30 ICs) in both; Tools > Inspect/label components by map, default1:30, Ok; in EEGLAB click button 1, toggle ACCEPT -> REJECT, OK, OK. - eegprep now: a static matplotlib grid of the same maps; clicking a map does nothing; no per-component window, no toggles, no OK/Cancel. Marking only through a new text field "Components to mark for rejection". History
EEG = pop_selectcomps(EEG, [1 ... 30], reject=[1]);(screenshots/ep_selectcomps_grid_20261123_090207.png,ml_selectcomps_grid_20261123_090153.png,ml_prop_comp1_20261123_090251.png). The property window does work from Tools > Classify components using ICLabel > Label components (pop_viewprops, F57 fixed there). - EEGLAB:
functions/popfunc/pop_selectcomps.m:200-205one pushbutton per map colored bygcompreject, callbackpop_prop(EEG, 0, ri, gcbo, {'freqrange', [1 50]});:216-221Cancel, "Set threhsolds", "See comp. stats", OK writesEEG.reject.gcompreject. Historypop_selectcomps(EEG, [1:30] );. - Root cause:
src/eegprep/functions/popfunc/pop_selectcomps.py:33-95draws a non-interactive figure plus areject=field. - Fix: Qt grid of clickable maps (35 per page as EEGLAB) that open the existing
functions/popfunc/pop_prop.pywindow with an ACCEPT/REJECT toggle reflecting back into the button colour; OK writesgcompreject, Cancel discards; add "Set thresholds" (EEGLAB's label has a typo; use the correct spelling and note it) and "See comp. stats" or document them; historyEEG = pop_selectcomps(EEG, [1:30]);plus the eeg_store line EEGLAB writes on OK. - Test: renderer test clicks map 1, toggles reject, OK, asserts
gcompreject[0] == 1; Cancel leaves flags unchanged; history string. - Clickable grid -> pop_prop -> OK writes gcompreject
6. DIPFIT > Create a head model from an MRI is not implemented (MISSING, low; F113)
- Repro: Tools > ... > Create a head model from an MRI.
- eegprep now: opens the dialog directly (no MRI file picker first), and Ok raises "MRI segmentation into a boundary-element head model is not implemented" (
src/eegprep/plugins/dipfit/pop_dipfit_headmodel.py:36-40). - EEGLAB:
plugins/dipfit/pop_dipfit_headmodel.m: file picker, then the headmodel dialog (MRI file, nasion/LPA/RPA, EEG/MEG, plot options), FieldTrip segmentation + BEM. - Expected: either port the pipeline (FieldTrip
ft_volumesegment+ft_prepare_mesh+ OpenMEEG/dipoli BEM, a large job) or, for this PR, keep the menu item visible but disabled with a tooltip that names the missing piece and the alternative (template BEM in Head model and settings), and document it ineeglab_migration.rst. Decision for Suraj/Arno; the disabled state is the minimum. - Ported, or disabled with tooltip and documented
7. DIPFIT > Distributed source component modelling (eLORETA) is not implemented (MISSING, medium; F117)
- Repro: after Leadfield, Tools > ... > Distributed source component modelling, Ok.
- eegprep now: dialog opens, Ok says "eLORETA source analysis is not implemented" (
src/eegprep/plugins/dipfit/pop_dipfit_loreta.py:43-47). Before Leadfield the "run pop_leadfield first" message is clear. - EEGLAB:
plugins/dipfit/pop_dipfit_loreta.mrunsft_sourceanalysis(eloreta) on the leadfield and plots withft_sourceplot. - Expected: port eLORETA (the leadfield and sourcemodel already exist in
EEG.dipfit.sourcemodel; eLORETA is a weighted minimum-norm iteration on that leadfield, FieldTripft_eloreta) with a parity test against FieldTrip-lite on jamming; if deferred, disable the item with a tooltip as in item 6. - eLORETA ported with parity, or disabled and documented
B. Minor
8. Edit > Dataset info: file/array rows disabled; error names no field (MINOR, low; F47)
- Repro:
eeglab_data.set, Edit > Dataset info; set name and subject (works, historyEEG = pop_editset(EEG, 'setname', 'renamed', 'subject', 'S01');); then typeabcin Data sampling rate. - eegprep now: channel location file, ICA weights, sphere and ICA channel rows and their "From other dataset"/"Browse" buttons are disabled (
functions/popfunc/pop_editset.py:162-180);srate abcgivespop_editset: could not convert string to float: abcand the dialog closes (F47). - EEGLAB:
pop_editset.menables those rows (EEGLAB's own srate error is poor: "Matrix dimensions must agree"). - Fix: enable the four rows with Browse (file) and From other dataset (index into ALLEEG), applying them as
pop_editset(..., 'chanlocs', file, 'icaweights', ..., 'icasphere', ..., 'icachansind', ...); validation messagepop_editset: Data sampling rate must be a positive number (got "abc"), dialog stays open (item 22). - Test: import weights/sphere from a file and from another dataset; equal to EEGLAB; error text test.
- Rows enabled and working; F47 message names field and fix
9. Edit > Event values: Delete/Insert/Append and field buttons disabled; raw float display (MINOR, medium)
- Repro:
eeglab_data.set, Edit > Event values, Event Num5+ Enter, Typezz, Event Num999+ Enter, Ok. - eegprep now: navigation and edits are right (F35 fixed; 999 jumps to 154 where EEGLAB ignores it: keep, document), but Delete event, Insert event, Append event and the field-name sort buttons are disabled (
pop_editeventvals.py:76,84,99,105); values show2.0,1.000068359375. - EEGLAB: buttons enabled; values via
num2str(value, 5)(pop_editeventvals.m:161,190). - Fix: enable and implement delete/insert/append (the function already accepts
'delete','insert','append') and the sort buttons; format with 5 significant digits. - Test: renderer test deleting, inserting and appending; result and history equal EEGLAB's.
- Buttons work; display matches
10. Edit > Channel locations: Enter fires the first button; Plot 2-D opens behind the dialog (MINOR, medium)
- Repro:
eeglab_data.set, Edit > Channel locations, type5in Channel number + Enter; then click Plot 2-D. - eegprep now: Read locations and Look up match EEGLAB (7e-14, 3.6e-14), but (1) Enter also triggers "Opt. head center" and opens its subdialog; (2) the Plot 2-D figure opens behind the modal dialog and cannot be raised (
screenshots/ep_chanedit_enter_20261123_081846.png,ep_chanedit_plot2d_raised_20261123_082128.png). Look up default file isstandard-10-5-342ch.locs(EEGLAB's template list differs). - Root cause: (1)
src/eegprep/functions/guifunc/qt.py:244creates bodyQPushButtons with Qt's defaultautoDefault=Trueinside aQDialog; (2)functions/popfunc/pop_chanedit.py:462->plot_utils.py:39figure.show()shows an unparented window while the dialog is application-modal. - Fix:
setAutoDefault(False)andsetDefault(False)for body pushbuttons (Ok stays default) inqt.py:244; parent figure windows opened from a modal dialog to that dialog (or make the dialog window-modal) andraise_()/activateWindow()after show; align the Look up default list withpop_chanedit.m. - Test: Qt test: Return in an edit does not click body buttons; figure window is a child of the dialog and visible on top.
- Enter only moves to the channel; Plot 2-D visible
11. Edit > Select data using events: single-choice event-type picker (MINOR, low)
- eegprep now: result identical to EEGLAB (14282 pnts, 221 events); the
...picker is a single-choiceQInputDialog. - EEGLAB: multi-select
pop_chansellist. - Root cause:
functions/popfunc/pop_rmdat.py:66-74does not passselectionmode="multiple", soqt.py:1275usesQInputDialog.getItem(the multi-select branch exists atqt.py:1262-1272). - Fix: pass
selectionmode="multiple"(as Extract epochs does after F124). Test: spec + renderer test selecting two types. - Multi-select picker
12. Edit > Select epochs or events: no confirmation, field buttons wrong (MINOR, low)
- eegprep now: result identical (38 epochs, 76 events); no "keep 38 epochs (delete 42)" confirmation; field buttons are disabled and show the whole description as their label; label "Retain old event type name(s) in field named".
- EEGLAB:
pop_selectevent.m:533questdlg2('Warning: keep N epochs (delete M ...)');:150short field names on buttons that show the description on click;:212label "... in (new) field named:". - Root cause:
functions/popfunc/pop_selectevent.py:101-140,390puts_field_descriptionin disabled buttons; no confirm step. - Fix: field name on the button, description in a message box on click; confirmation from the GUI path; EEGLAB label.
- Confirmation, buttons and label match
13. Edit > Append datasets default indices (MINOR, low)
- Result, ICA and history identical (F42 fixed). Default indices
1 2vs EEGLAB1: eegprep's default is more useful. Fix: document as deliberate ineeglab_migration.rstwith a spec test (pop_mergeset.py:70-85). - Documented and tested
14. Tools > Filter the data > Windowed sinc FIR: window labels and Estimate dialog (MINOR, low)
- eegprep now: result identical (forder 66, maxdiff 0); window list shows bare names; Estimate opens a one-field
QInputDialog"Transition bandwidth (Hz)" default 1.0 (qt.py:1153). - EEGLAB:
plugins/firfilt/pop_firws.m:94labelsHamming (PB dev=0.002, SB att=-53dB)etc.;:248Estimate callspop_firwsord(srate, window, transition bandwidth, max passband deviation for Kaiser). - Fix: EEGLAB labels in
plugins/firfilt/pop_firws.py:109; Estimate opens the existingplugins/firfilt/pop_firwsord.pydialog prefilled with srate and window. - Labels and Estimate dialog match
15. Tools > Reject data using Clean Rawdata and ASR: review window (MINOR, low)
- eegprep now: same controls, defaults, history and channels removed; on the same input equal to EEGLAB (maxdiff 0). The pop-up is an eegplot browser with rejected periods highlighted (
plugins/clean_rawdata/vis_artifacts.py). - EEGLAB:
vis_artifactssuperposes old (red) and new (blue) data with removed channels in red. - Fix: add the superposition mode to
vis_artifacts(eegplot already supportsdata2overlay) or document the different review window. - Superposition view or documented
16. Tools > Decompose data by ICA: algorithm list; seeded parity (MINOR, medium; F69)
- eegprep now: same layout and history; list has AMICA, Infomax picard, FastICA picard where EEGLAB has SOBI x2, JADE and binica (
functions/popfunc/pop_runica.py:27-29); default runs agree as run-to-run Infomax does (median matched r 0.88). F69 (identical input withrndreset 'no'still differs) was not re-run. - Fix: document the list difference; re-run F69 on jamming with fixed seeds on both sides and open a separate numeric issue if it still differs (no tolerance changes here).
- Documented; F69 re-run reported in the PR
17. Tools > Classify components using ICLabel > Flag components as artifacts: history (MINOR, medium; F55)
- eegprep now: same rows, defaults and result (comp 11); history
EEG = pop_icflag(EEG, thresholds=[None None; 0.9 1; 0.5 1; ...]);runs nowhere. - EEGLAB:
EEG = pop_icflag(EEG, [NaN NaN;0.9 1;0.5 1;NaN NaN;NaN NaN;NaN NaN;NaN NaN]);. - Root cause:
src/eegprep/plugins/ICLabel/pop_icflag.py:159-165. - Fix: positional matrix with
NaN. Test: history string; the line replays in eegprep's history runner. - Runnable history
18. Tools > Remove components from data: flagged question and confirmation missing (MINOR, low)
- eegprep now: goes straight to the manual dialog with 11 prefilled; result equals EEGLAB (5e-5 uV); history
EEG = pop_subcomp(EEG, [11], 0);(EEGLABpop_subcomp( EEG, [], 0, 0);). - EEGLAB:
pop_subcomp.m:92-93"Components [11] flagged for rejection. Do you want to remove these components?" (Cancel / Manual rej. / Yes);:184-185"Confirmation" with Plot ERPs / Plot single trials / Accept. - Fix: add both steps in the GUI path (
functions/popfunc/pop_subcomp.py:40-75) using the existing compare plot; history as EEGLAB. - Both prompts; history matches
19. DIPFIT > Component dipole autofit: plot and history (MINOR, medium; F114/F115 history)
- eegprep now: with the same transform the fit equals EEGLAB; the plot appears (F118 fixed) as a 3-D scatter with legend (no MRI slices, no Plot one/Next/Prev, no area labels); history
pop_multifit(EEG, [1, 2, 3], threshold=100, rmout=off, ...). - EEGLAB:
dipploton the MNI MRI with navigation and area labels; historyEEG = pop_multifit(EEG, [1:3] ,'threshold',100,'dipplot','on','plotopt',{'normlen' 'on'});. - Root cause:
src/eegprep/plugins/dipfit/_utils.py:116-121dipfit_historywrites Python keywords for every DIPFIT command (multifit, gridsearch, leadfield, settings);pop_dipfit_gridsearch.py:61-68,100-103writes typed grids as quoted strings and default grids as expanded literal arrays (F114). - Fix: EEGLAB-form history for all DIPFIT commands (grids as
linspace(-85,85,24)); dipplot overstandard_mrislices with Plot one/Next/Prev (item 20). - Runnable history for every DIPFIT command
20. DIPFIT > Component dipole plot: background picker disabled, plain scatter (MINOR, low)
- eegprep now: same rows and defaults; background
...disabled (src/eegprep/plugins/dipfit/pop_dipplot.py:98); plot is a matplotlib 3-D scatter. - EEGLAB:
pop_dipplot.m/dipplot.m: three MRI slices with dipoles, navigation, background image picker. - Fix: enable the picker; draw dipoles over the template MRI slices with navigation.
- MRI-slice plot and picker
21. DIPFIT > Distributed source Leadfield matrix: history (PASS with follow-up)
- Leadfield computed and stored (F116 fixed); history
EEG = pop_leadfield(EEG, sourcemodel=loreta-key, downsample=4). Fix: EEGLAB form via item 19. - MATLAB-form history
22. Shared: dialogs close on validation errors
- Seen in File > Import data > From ASCII (Ok with no file), File > Import event info > From MATLAB array (wrong box), Edit > Dataset info (srate abc): the error is clear but the dialog closes and the user re-enters everything.
- Fix: in the shared
inputguipath, show the error and keep the dialog open with the typed values when the pop function raises a validation error (ValueError), closing only on success or Cancel; phrase hints in GUI terms (e.g. "Input field names", "Number of header lines"). - Test: renderer test that a raising validator leaves the dialog open with values intact.
- Dialog stays open on validation errors
Global definition of done
- Every checkbox above ticked, or a finding explicitly marked deferred in the PR with Suraj's agreement (items 6 and 7 at minimum disabled with a tooltip and documented)
- GUI retest side by side with EEGLAB (pin 8ac485f6) of every Edit and Tools item above on the same datasets, screenshots attached to the PR
- MATLAB parity on jamming for every numeric item (1, 2, 3, 4, 5, 7, 16) with scripts committed under
tests/matlab/ - Tests added for every finding; no changes to
tests/fuzz/,tolerances.toml, goldens or parity JSON (only Suraj or Arno change those) - Where EEGLAB has a quirk (
pop_selectout-of-range, "Set threhsolds" label, Event values 999, merge default, F60pop_interpt_range), eegprep does the correct thing, documents it, and a test locks it in - Error messages name the function and the fix; no comments that restate code or justify workarounds
- History lines for Edit/Tools commands are runnable in EEGLAB
Activity
claude commentedon Nov 23, 2026
🤖 Plan:
6b8012cfResearch
The issue has 22 findings across about 20 modules (DIPFIT, firfilt, ICLabel, popfunc, the Qt renderer). It also needs MATLAB parity runs on jamming and a side-by-side GUI retest. Several items are feature ports, not bug fixes: eLORETA, the MRI head model, a clickable
pop_selectcomps, and dipplot on MRI slices. One PR would run to several thousand lines and could not be reviewed. The five root causes I checked match the issue text.Relevant code (checked)
plugins/dipfit/_utils.py#L62- fallbackcoord_transformthat EEGLAB does not haveplugins/dipfit/pop_dipfit_settings.py#L70-L77- fallback used; Co-register and...hardcodedenabled=Falseat L139/L143plugins/dipfit/dipfit_gridsearch.py#L74-posxyzsaved as nested[[x,y,z]], which crashes fine fitfunctions/popfunc/pop_select.py#L391-L398- keeps both end samples; EEGLABepoch.m:106-107drops the last oneplugins/firfilt/pop_firpmord.py#L55-L59- uses the Kaiser order formula instead of MATLAB'sremlpord, and rounds to even in the wrong placeProposed Fix
Split the work into separate PRs that each say
Part of #675. Ordered by severity, then size:posxyz/momxyzas(ndip,3)arrays in gridsearch and multifit, and read them withreshape(-1,3)pop_select, keep samplesround(tmin*srate)toround(tmax*srate)-1for epoched data and set xmin/xmax from the kept samplesselectionmode="multiple"inpop_rmdatpop_icflaghistory as a positional matrix with NaNsetAutoDefault(False)on body pushbuttons inqt.py:244firpmord/remlpordso the function returnsceil(L)-1, and do the even rounding in the pop_firpm Estimate callback. Add a MATLAB parity test. This changes a core function, so it needs the EEGLAB reference run.guifunc/coregister.py, and enablepop_chanselfor channels to omit. Write DIPFIT history in EEGLAB form. This changes a core function, so it needs the reference run.inputguiopen when the function raisesValueError. Then enable thepop_editsetfile and array rows, with errors that name the field.pop_selectevent: confirmation prompt and field buttonspop_firwsordpop_subcomp: both promptspop_selectcomps(item 5): clickable Qt grid that openspop_propwith ACCEPT/REJECT and writesgcompreject. Needs the visual parity loop.eeglab_migration.rstplus spec tests. Report the seeded F69 re-run separately.Open questions for maintainers (Suraj/Arno):
pop_propACCEPT/REJECT flow required, or can the existing ICLabelpop_viewpropspath serve until then?I can start group 1 right away once the split is approved.
Finish the remaining Edit and Tools audit items
Fix Edit and Tools audit findings (#675) (#677)
Merge origin/develop at f6bea53.
arnodelorme commentedon Dec 1, 2026
🤖 The Linux geometry follow-up for the Parks–McClellan Estimate dialog is tracked in #891.
arnodelorme commentedon Dec 1, 2026
🤖 The pop_subcomp dialog and native jamming captures are tracked in #936.
arnodelorme commentedon Dec 1, 2026
🤖 The pop_dipfit_headmodel dialog and native jamming captures are tracked in #998.
arnodelorme commentedon Dec 1, 2026
🤖 The pop_dipfit_settings dialog and native jamming captures are tracked in #1002.
arnodelorme commentedon Dec 1, 2026
🤖 The pop_dipfit_nonlinear dialog and native jamming captures are tracked in #1004.