Repository navigation
[GUI] Ask pop_eegplot epoch options before Reject by inspection - #803
Conversation
Both Reject by inspection entries now ask whether to add to previously marked rejections and whether to reject marked trials before the browser opens, as pop_eegplot.m does. Cancel opens no browser. Fixes #793 Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 @claude[bot]'s task in 1m 2s —— View job Code review
BlockingNone. Important
NitsNone. Test gaps
EEGLAB parity notes
Checked for correctness bugs, EEGLAB parity, data structure compatibility, changed-behavior tests, and CLAUDE.md/AGENTS.md compliance. I did not run the tests in this job. |
| # eeglab.m calls pop_eegplot(EEG, icacomp) for both Reject by inspection entries, | ||
| # so pop_eegplot.m asks how to apply marks before the browser opens. | ||
| if variant in {"reject_data", "reject_ica"} and parent is not None: | ||
| epoch_options = pop_eegplot_epoch_options(icacomp) | ||
| if epoch_options is None: | ||
| return | ||
| superpose, reject = epoch_options |
There was a problem hiding this comment.
Important (EEGLAB parity / GUI–console consistency): The options dialog is added in the menu dispatcher, but in EEGLAB it belongs to pop_eegplot.m itself. It runs when nargin < 3 && EEG.trials > 1. Because the comment here says "eeglab.m calls pop_eegplot(EEG, icacomp)", the prompt comes from the pop function, not from the menu.
As written, the menu asks the questions. A console user who types pop_eegplot(EEG, 1) on epoched data does not get them: the browser opens with superpose=0, reject=1 (Reject mode, prior marks hidden). In EEGLAB, the same call asks first. The continuous-data instruction dialog already lives inside pop_eegplot (reject_omitted at
eegprep/src/eegprep/functions/popfunc/pop_eegplot.py
Lines 115 to 117 in 07f29a1
Suggested fix:
- In
pop_eegplot, whenshow and reject_omitted and trials > 1, callpop_eegplot_epoch_options(icacomp). Return(None, "")/Noneon cancel, and otherwise setsuperpose, rejectfrom the result. - Here, stop passing
superpose/rejectfor thereject_data/reject_icavariants and remove this block. The history command then still comes out aspop_eegplot(EEG, icacomp, superpose, reject). - Add one console-path test:
pop_eegplot(epoched_eeg, 1, return_com=True, command_callback=...)with the dialog cancelled opens no browser.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Follow-up to the review, after #776 was merged. The dialog is now inside A second review found one EEGLAB condition missing: Captures are at the top of the description. Develop was merged into the branch twice (no force push). The only failing CI check is the Windows test The review is now clean and every other check passes, so I merged it with a squash, as Arno asked. After #804, #690 and #830 were merged their changelog entries conflicted with this one, so develop was merged in once more (changelog only); the pop_eegplot and menu tests, lint and docs build passed again before the merge. — orchestrator |
EEGLAB and EEGPrep before (Linux, jamming, November 28 run)
On epoched data with events,
pop_eegplot(EEG, icacomp)called withoutsuperposeandrejectnow asks EEGLAB's two questions before the browser opens: "Add to previously marked rejections? (checked=yes)", checked by default, and "Reject marked trials? (checked=yes)", unchecked by default. Cancel opens no browser and records no command. The answers becomesuperposeandreject, and the history readspop_eegplot(EEG, icacomp, superpose, reject). The dialog lives inpop_eegplotitself, as inpop_eegplot.m, so the three menu entries that callpop_eegplot(EEG, 1)orpop_eegplot(EEG, 0)(Tools > Inspect/reject data by eye, and both Reject by inspection entries) and a call typed in eegprep-console behave the same.Details and tests
The dialog is skipped, as in EEGLAB, when
superposeorrejectis given (Plot > Channel data (scroll), Plot > Component activations (scroll), pop_rejmenu), on continuous data, when the dataset has no events, and withshow=False. Tests cover the menu cancel path, mark-only with earlier marks kept, ICA rejection, a console-path cancel, and a dataset without events. Docs, help and changelog are updated.Fixes #793
🤖 Generated with Claude Code