Repository navigation
[GUI] ICA decomposition dialog - #1044
Conversation
There was a problem hiding this comment.
If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.
Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
|
Claude finished @arnodelorme's task in 1m 8s —— View job Code review
BlockingNone. Important
Nits
Test gaps
EEGLAB parity notes
|
| described = [_described(control) for control in spec.controls] | ||
| expected = [_described(control) for control in recorded.controls] | ||
| if name.split(".")[0] == "pop_runica": | ||
| # The list of backends depends on the installed ICA implementations. |
There was a problem hiding this comment.
Nit: This comment is inaccurate. _ALGORITHMS in pop_runica.py is a static tuple, so the list never depends on which ICA implementations are installed. The list differs from the reference because EEGPrep ships a different backend set: it adds AMICA and Picard, and has no acsobiro/"Executable runica" entries. Suggested wording: # EEGPrep offers a different ICA backend set than EEGLAB; compare only the shared entries.
| Select the anatomical T1 MRI in the file chooser. The head-model prompt displays the BIDS sidecar indicator, when available, in its | ||
| read-only fiducial fields. MRI segmentation requires a separate FieldTrip workflow. | ||
|
|
||
| The ICA decomposition window sizes the algorithm list to three rows and uses the installed EEGPrep backends. The channel type and label selectors are alongside their input. |
There was a problem hiding this comment.
Important (docs accuracy): The dialog does not detect "installed" backends. It always lists the seven fixed _ALGORITHMS entries (
eegprep/src/eegprep/functions/popfunc/pop_runica.py
Lines 24 to 34 in 48a2edb
| The ICA decomposition window sizes the algorithm list to three rows and uses the installed EEGPrep backends. The channel type and label selectors are alongside their input. | |
| The ICA decomposition dialog lists the algorithms EEGPrep supports (Extended Infomax, AMICA, Picard, SOBI and JADE) in a three-row list. Choosing an algorithm fills in its default command-line options. The **... types** and **... channels** buttons next to the channel field pick channels by type or by label. |
arnodelorme
left a comment
There was a problem hiding this comment.
This review was written by an AI assistant during a nightly check, not by Arno.
Code review
- Overall assessment: Needs changes for the multi-dataset list box height. Single-dataset dialog geometry, first-item list box width measurement, empty channel-type warning, and Sphinx docs match the intended behavior.
- Highest-risk area: Multi-dataset
datasetlist box height inpop_runica_dialog_specafter switching tolayout="supergui". - Merge recommendation: Needs changes.
Blocking
None.
Important
- Multi-dataset
datasetlist box shrinks to one edit-box line (src/eegprep/functions/popfunc/pop_runica.pylines 174 to 201). Switchingpop_runica_dialog_spectolayout="supergui"and removingextra_stylesheet(min-height: 50pxandmax-height: 50pxonQListWidget#dataset) makes_FigureLayoutsize every row strictly fromgeomvert. Becausegeomvert.extend([1, 1, 1])gives thedatasetlist box row a weight of1, the multi-selectQListWidgetrenders at single-line edit height (24 px on Linux and 36 px on macOS, where the second item's bottom sits at 37 px and is clipped). Suggested fix: changegeomvert.extend([1, 1, 1])togeomvert.extend([2, 1, 1])(about 50 px on Linux, matching the removed stylesheet) orgeomvert.extend([3, 1, 1])if EEGPrep keeps its dataset selector row, or drop thedatasetrow if strict parity with EEGLABpop_runica.mlines 228 to 238 is preferred.
Nits
- Unused
QDialog#pop_runica QListWidgetstylesheet rule (src/eegprep/functions/guifunc/qt.pylines 1027 to 1035). Now thatpop_runica_dialog_spec(the onlyDialogSpecwithfunction_name="pop_runica") useslayout="supergui",_apply_eeglab_stylereplacesrow_layout_sizesbefore applying the stylesheet, making lines 1027 to 1030 unreachable (AGENTS.mdasks to remove code made unused by the change). Suggested fix: delete theQDialog#pop_runica QListWidgetblock fromrow_layout_sizes.
Test gaps
tests/test_gui_geometry.pycovers single-datasetpop_runicaandpop_runica.continuous, whiletest_qt_renderer_defaults_to_all_selected_dataset_rowsintests/test_gui_pop_runica.pylines 284 to 294 checks only selected indices. Adding an assertion thatwidgets["dataset"].height()fits at least two rows whenpop_runica_dialog_spec([first, second])is built would guard the multi-dataset layout.
EEGLAB parity notes
- Verified in MATLAB R2025b that
uicontrol('Style', 'listbox')reportsExtentfrom item 1 regardless ofValue([0, 0, 29.33, 18.67]on{'short', 'much longer second item'}for bothValue = 1andValue = 2), matching_text_extentinsrc/eegprep/functions/guifunc/qt.pylines 1189 to 1196 andtest_runica_width_follows_first_visible_algorithm_only. - Checked against EEGLAB
functions/popfunc/pop_runica.mat5e0be87059098662dc9b50fb378f9002b0ef173a(lines 189 to 238): single-dataset control order, trailing newline on the first prompt label,geometry,geomvert, shared algorithm order, and keeping... typesenabled with a warning when no channel types exist all match EEGLAB. Forlength(ALLEEG) > 1, EEGLAB adds only the two concatenate checkbox rows (geomvert = [geomvert 1 1]), whereas EEGPrep adds adatasetlist box row above them. - Tests run in a detached worktree at
9833fbde58c0645bfe5946dc0a30a41028f6e40aon macOS:pytest tests/test_gui_geometry.py tests/test_gui_pop_runica.py(133 passed, 54 Linux pixel-reference cases skipped),pytest tests/test_guifunc_primitives.py tests/test_gui_long_task.py(17 passed, 1 deselected), andruff checkplusruff format --checkon the four modified Python files (all passed).
arnodelorme
left a comment
There was a problem hiding this comment.
This review was written by an AI assistant during a nightly check, not by Arno.
Code review
- Overall assessment: Safe to merge. Checked single-dataset and multi-dataset
superguigeometry, first-itemQListWidgettext extent measurement, empty channel-type warning handling, Sphinx documentation, and GUI tests. - Highest-risk area: None identified.
- Merge recommendation: Safe to merge.
Blocking
None.
Important
None.
Nits
None.
Test gaps
None.
EEGLAB parity notes
- Single-dataset control order, trailing newline on the first prompt label,
geometry,geomvert, shared algorithm order, first-item list boxExtentwidth measurement in_text_extent, and keeping... typesenabled with a warning dialog when no channel types exist all match EEGLABfunctions/popfunc/pop_runica.m(lines 189 to 238 and 269 to 271). - For multiple datasets (
dataset_count > 1), EEGLAB adds only the two concatenate checkbox rows (geomvert = [geomvert 1 1]), whereas EEGPrep adds adatasetselector list box above them. Settinggeomvert.extend([2, 1, 1])sizesQListWidget#datasetto 76 px high on macOS (19 px per item row) and about 51 px on Linux, fitting multiple dataset rows cleanly. - Tests run in a detached worktree at
16ba9128bc3468a152eb01ffa67272ccfd058504on macOS:pytest tests/test_gui_geometry.py tests/test_gui_pop_runica.py(134 passed, 54 Linux pixel-reference cases skipped),pytest tests/test_guifunc_primitives.py(14 passed, 1 deselected),ruff checkandruff format --checkon the four modified Python files (passed),ty checkon the modified package modules (passed), andpre-commit.pyon all 10 changed files (passed).
Keep develop's PUBLIC_CALLS table and add the two pop_runica cases, keep both documentation paragraphs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ICA decomposition dialog · #1005, part of #875. Stack base PR #1028.
Across 2 native openings, maximum vertical control displacement was 0.55 px. The largest difference in overall width was 0.74 px. Of 3 output comparisons, 0 met tolerance. Same 2,048 recorded samples; four, five, or six channels; standard infomax, fixed stream, at most 128 steps. Matched components by maximum absolute correlation, centered and scaled channels to unit RMS, and aligned signs before comparing activations. The worst matched absolute correlation was 0.999851. The cause of the remaining waveform differences is unverified. The reporting threshold is 1e−5. Raw outputs, commands and checks are in tools-extra/numeric-inputs/.
EEGPrep lists the ICA backends it can run. In three recorded-data decompositions the aligned components correlated at least 0.99985, while peak relative waveform differences of 0.00398 to 0.00452 exceeded the 0.00001 tolerance.
Clean Linux checkouts on jamming. EEGLAB
5e0be87059098662dc9b50fb378f9002b0ef173a, EEGPrep2c3b624b15bcf6a842ca1ece109576001dd35f7b. Fixes #1005.Full inventory report for the project team. pop_runica (p. 63). PDF · Editable Word.