Repository navigation
[GUI] Match the activity plot parameter dialog - #987
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 45s —— View job Code review
BlockingNone. Important
NitsNone. Test gaps
EEGLAB parity notes
|
| count = int(EEG.get("nbchan", 0) or 0) if is_channel else np.asarray(EEG.get("icaweights", [])).shape[0] | ||
| label = "Channel" if is_channel else "Component" | ||
| controls = ( | ||
| ControlSpec("text", f"{label} number(s):"), |
There was a problem hiding this comment.
Important (docs/behavior mismatch): This PR adds the following sentence to docs/source/api/interactive_pop_workflows.rst: "The component activity dialog displays the available index range and puts each multi-line prompt above its answer". The code doesn't do that. For typeplot=0, the first prompt is still the single-line "Component number(s):", so inputdlg2_geometry gets no multi-line prompts and returns the side-by-side (1, 0.6) layout. The upper bound never appears in the prompt either.
EEGLAB's pop_plotdata.m builds the component prompt as sprintf('Component number(s):\n(up to %d)', size(EEG.icaweights,1)), which makes inputdlg2 stack every prompt above its answer. The two recorded cases only cover typeplot=1, so the geometry test can't catch this.
Suggested fix: build the prompt by type, then add a pop_plotdata.component geometry case (MATLAB pop_plotdata(EEG, 0)) so the stacked layout is checked against EEGLAB:
| ControlSpec("text", f"{label} number(s):"), | |
| ControlSpec("text", "Channel number(s):" if is_channel else f"Component number(s):\n(up to {count})"), |
If the component prompt is meant to stay single-line, drop the docs sentence instead.
# Conflicts: # tests/test_gui_geometry.py # tools/gui_geometry/matlab/record_geometry.m
|
🤖 Second round on the review above (commit
Checked on jamming before the change was pushed: 117 geometry cases passed on this branch with the new case. |
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: Looks good.
- Highest-risk area: None identified.
- Merge recommendation: Safe to merge.
Blocking
None.
Important
None.
Nits
None.
Test gaps
None.
EEGLAB parity notes
None.
Checked pop_plotdata_dialog_spec against EEGLAB functions/popfunc/pop_plotdata.m and functions/guifunc/inputdlg2.m (both channel and component dialogs pass three single line prompts to inputdlg2 with [1 0.6] row weights, empty geomvert, and 1:N default index range, including "1:0" when empty), documentation synchronization in docs/source/api/interactive_pop_workflows.rst, geometry recordings in tools/gui_geometry/, and AGENTS.md compliance.
Tests run at 94ba7895713ac552acb37b8948d2745cdd65620a: tests/test_gui_geometry.py (149 passed, 70 Linux reference font checks skipped on macOS), tests/test_popfunc_visual_eeglab_tests.py (test_pop_plotdata_selects_modes_trials_averages_and_single_trial_overlays, 1 passed), tests/test_stream7_plots.py (plotdata replay check, 1 passed), and ruff check on src/eegprep/functions/popfunc/pop_plotdata.py and tests/test_gui_geometry.py (passed).
Match the activity plot parameter dialog. The continuous window measured 171 px high in MATLAB, 254 px before the fix and 171 px afterward. Stack base is #984.
Across 2 native openings, the largest vertical control offset was 0.49 px (target 1 px). Numerical comparison of average plotted waveform: 2/2 measured cases within tolerance.
EEGLAB
5e0be870, EEGPrep after2e458385, clean Linux checkouts. Part of #875.Fixes #988.
Full inventory report for the project team. pop_plotdata (p. 41). PDF · Editable Word.