Skip to content

Match four FIR filter dialogs to the EEGLAB layout - #888

Merged
arnodelorme merged 3 commits into
developfrom
agent/issue-875-fir-dialogs
Dec 1, 2026
Merged

arnodelorme merged 3 commits into
developfrom
agent/issue-875-fir-dialogs

Conversation

@arnodelorme

@arnodelorme arnodelorme commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Move the basic FIR filter, moving average, Parks–McClellan filter and Kaiser beta dialogs to the recorded EEGLAB layout. Across seven calls on jamming, the largest row offset was 0.66 pixel. All four windows match MATLAB’s height to the nearest pixel.

pop_eegfiltnew

pop_eegfiltnew

pop_firma

pop_firma

pop_firpm

pop_firpm

pop_kaiserbeta

pop_kaiserbeta

Row distance across seven calls

Row distance across seven calls

Cause and changes

The four dialogs supplied fixed window sizes. They now use the recorded row and column proportions, including the double-height explanatory row in the basic filter. The shared Linux label measurement follows the multiline Helvetica extent measured in MATLAB R2025b. Button shape, text rendering and up to 17 pixels of width still differ.

Verification

The MATLAB recorder called the EEGLAB functions at 5e0be870. The before and after captures came from the real EEGPrep functions. Both continuous and epoched samples were used for each filter, and Kaiser beta was opened without a dataset. The histogram compares the actual EEGPrep windows with the corresponding MATLAB windows. Baseline EEGPrep was 64fcfac8. All computation and rendering ran on jamming with the tested checkout’s src first on PYTHONPATH. The FIR and geometry selection passed 124 tests, with nine skips. The broader Linux selection passed 3,583 tests with 32 skips in 261 seconds. Commit c94c592f formats the test renderer. All 72 geometry tests passed on that commit, along with Ruff, ty and the staged pre-commit checks.

Part of #875.

Full inventory report for the project team. pop_eegfiltnew (p. 66), pop_firma (p. 67), pop_firpm (p. 68), pop_kaiserbeta (p. 96). 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 Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @arnodelorme's task in 1m 0s —— View job


Code review

  • Overall assessment: Looks good. I found no blocking or important issues. The four FIR dialogs (pop_eegfiltnew, pop_firma, pop_firpm, pop_kaiserbeta) now use the supergui layout, and their geometry is checked against MATLAB recordings on both continuous and epoched data.
  • Highest-risk area: the shared _text_extent change in src/eegprep/functions/guifunc/qt.py. It changes the measured height of every multiline QLabel drawn by supergui on Linux. I checked all supergui dialog specs, and pop_eegfiltnew is the only one with a multiline text label, so no other dialog moves today.
  • Merge recommendation: Safe to merge.

Blocking

None.

Important

None.

Nits

  • qt.py _text_extent, magic numbers: 72 / 96 and 1.2 are written inline. The neighbouring extent factors (_EXTENT_LINE_HEIGHT, _EXTENT_WIDTH_SCALE, _EXTENT_WIDTH_PADDING) are top-level constants. AGENTS.md asks for semantically important numbers to be top-level constants. A _LINUX_LABEL_LINE_SPACING = 1.2 constant next to them would keep the MATLAB extent model in one place. The formula itself checks out: at 16 px (12 pt), round(n·12·1.2) gives 14, 29 and 43 pt for n = 1, 2, 3, which matches the comment.

Test gaps

None. The new cases cover the behaviour that changed:

  • the double-height row in pop_eegfiltnew, through the stricter geomvert tuple comparison;
  • continuous and epoched inputs for each filter;
  • pop_kaiserbeta with no dataset.

The tests go through the public pop_* calls with a capturing renderer, the same way MATLAB recorded them.

EEGLAB parity notes

None. This PR changes only dialog layout: no option values, filter defaults or processing code. Each spec's geometry, geomvert, title and controls are checked against the MATLAB recordings from EEGLAB 5e0be870, so there is no numerical change and no need for a MATLAB reference run.

Checked for correctness bugs, EEGLAB parity, data structure compatibility, changed-behaviour tests and CLAUDE.md/AGENTS.md compliance. I could not run tests/test_gui_geometry.py here because the command needs approval in this sandbox. This review is from reading the code; for test results I relied on the 124 passes reported in the PR description.

# Conflicts:
#	docs/source/changelog.rst
#	tools/gui_geometry/README.md
@arnodelorme
arnodelorme merged commit 825b709 into develop Dec 1, 2026
5 checks passed
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