Skip to content

[GUI] Artifact cleaning dialog - #1045

Open
arnodelorme wants to merge 2 commits into
agent/issue-1005-runica-dialogfrom
agent/issue-1008-clean_rawdata-dialog
Open

arnodelorme wants to merge 2 commits into
agent/issue-1005-runica-dialogfrom
agent/issue-1008-clean_rawdata-dialog

Conversation

@arnodelorme

@arnodelorme arnodelorme commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Artifact cleaning dialog · #1008, part of #875. Stack base PR #1044.

Continuous

Vertical control alignment

Retained EEG samples

Across 1 native openings, maximum vertical control displacement was 0.50 px. The largest difference in overall width was 3.48 px. Of 3 output comparisons, 3 met tolerance. Continuous sample, five-second flatline detector only; zero, one or two channels held constant for the controlled tests. Also verified the ordered retained labels. Raw outputs, commands and checks are in tools-extra/numeric-inputs/.

Clean Linux checkouts on jamming. EEGLAB 5e0be87059098662dc9b50fb378f9002b0ef173a, EEGPrep cd8e9d1e2d05693b9bee96b7831f4c01529eb26a. Fixes #1008.

Full inventory report for the project team. pop_clean_rawdata (p. 79). PDF · Editable Word.

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization has no extra usage available to pay for this review.

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

claude Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

PR #1045 was updated after the trigger (1af7a05 -> cd8e9d1). Push again or mention Claude to run on the latest version.

@arnodelorme arnodelorme left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This review was written by an AI assistant during a nightly check, not by Arno.

Code review

  • Overall assessment: Needs changes for the section toggle mismatch between the added documentation and the dialog specification. Recorded supergui geometry, geomvert, fit_width=False flags, label spacing, and single dataset layout match EEGLAB.
  • Highest-risk area: Documentation in docs/source/api/preprocessing_and_artifacts.rst claiming that checking a section enables its thresholds when three section checkboxes have no toggle_enabled callbacks and the drift text label remains disabled.
  • Merge recommendation: Needs changes.

Blocking

None.

Important

  • Added docs claim section checkboxes enable their thresholds, which does not match pop_clean_rawdata_dialog_spec (docs/source/api/preprocessing_and_artifacts.rst lines 14 to 16, src/eegprep/plugins/clean_rawdata/pop_clean_rawdata.py lines 120 to 133, and src/eegprep/plugins/clean_rawdata/pop_clean_rawdata.py lines 171 to 209). Line 15 of preprocessing_and_artifacts.rst states: "Check a section to enable its thresholds." In pop_clean_rawdata_dialog_spec, chanrm, asr, and rejwin all start checked (value=True) and have no toggle_enabled callbacks, so unchecking or checking them in the dialog leaves all of their threshold controls enabled (unlike cb_chan, cb_asr, and cb_rej in EEGLAB plugins/clean_rawdata/pop_clean_rawdata.m lines 48 to 50). In the drift section (filter), checking the box enables filterfreqs, while the label updated on line 129 (enabled=False) has no tag and stays disabled instead of enabling alongside filterfreqs as cb_filter does in pop_clean_rawdata.m lines 47 and 56. Suggested fix: either update line 15 of docs/source/api/preprocessing_and_artifacts.rst to describe actual dialog behavior (channel, ASR, and window rejection sections open enabled by default, while checking Remove channel drift enables the transition band input) and add a tag on line 129 so filter also enables its label, or wire CallbackSpec("toggle_enabled", ...) onto chanrm, asr, and rejwin with distinct tags on the section labels (keeping chanuse_button and chanignore_button gated on bool(labels) when channel labels are absent).

Nits

None.

Test gaps

None.

EEGLAB parity notes

  • Checked against EEGLAB plugins/clean_rawdata/pop_clean_rawdata.m (lines 47 to 118) and the recorded pop_clean_rawdata.continuous geometry at 5e0be87059098662dc9b50fb378f9002b0ef173a: control order, geometry, geomvert, the 12 trailing spaces on the FIR transition band label (line 56), and fit_width=False on asrrej and both asrwintext labels (where 'tag' precedes 'string' in uilist on lines 83, 86, and 88 so supergui.m omits them from figure width calculation) all match EEGLAB.
  • Offscreen Qt verification on macOS (QtDialogRenderer().build_dialog) rendered all 30 visible controls at 722 by 815 px with zero horizontal text clipping.
  • Tests run in a detached worktree at cd8e9d1e2d05693b9bee96b7831f4c01529eb26a on macOS: EEGPREP_SKIP_MATLAB=1 pytest tests/test_gui_geometry.py tests/test_gui_pop_clean_rawdata.py tests/test_clean_rawdata_channel_removal.py tests/test_guifunc_pophelp_chansel.py tests/test_guifunc_primitives.py (152 passed, 55 Linux pixel reference cases skipped, 3 deselected), ruff check and ruff format --check on the two modified Python files (passed), and ty check on pop_clean_rawdata.py (passed).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant