Skip to content

pop_firwsord (Tools > Filter the data): match FIR window defaults and dialog geometry #892

Done

Description

@arnodelorme

The windowed-sinc order estimator preserves the supplied sampling rate, window and deviation and opens at MATLAB’s 196-pixel height. Both the public function and the filter’s Estimate button use the corrected dialog. Base is #894, on #888.

Default Hamming

Hamming to Kaiser

Kaiser at 250 Hz

Numerical distances

All six GUI states

Reproduction and verification

All six initialized Qt states matched live MATLAB controls. Hamming shows a disabled 0.0022. Switching from Hamming to Kaiser enables and retains 0.0022. Opening Kaiser with 250 Hz and 0.003 shows the supplied inputs. The largest row offset was 0.50 px. MATLAB measured 595 × 196, EEGPrep 596 × 196 (formerly 480 × 255). The additional opening case requests the missing deviation when Kaiser bandwidth is already known.

On jamming with EEGLAB 5e0be870 and EEGPrep 17760b46, all six order/deviation comparisons had zero numerical distance. The focused geometry and filter suites passed 119 tests, with nine optional MATLAB-wrapper tests skipped. Live MATLAB was run separately.

Fixes #892. Part of #875.

Activity

  1. added
    function-parity
    on Dec 1, 2026
  2. claude commented on Dec 1, 2026

    @claude
    Contributor

    🤖 Plan:

    • Move pop_firwsord_dialog_spec to layout="supergui" (drops the fixed size=(480, 232)); with MATLAB's Linux text extents (26.7 px) inputgui_layout gives 196 px, as in MATLAB
    • Fill the deviation edit from the firwsord window table (0.089, 0.0063, 0.0022, 0.0002, empty for Kaiser) at open and on window change, via the existing choice_text callback; pass it as initial value when opened from pop_firws Estimate
    • Offscreen Qt regression test in tests/test_pop_firfilt.py
    • PR [pop_firwsord] Match EEGLAB window deviation defaults and dialog layout #895
    • CI unit tests (lint, ty, docs, pre-commit pass; OS matrix running)

    Research

    pop_firwsord_dialog_spec still used the old "qt" layout with a hard-coded size, and the dev edit started empty; MATLAB fills it from a CreateFcn/Callback on the window popup.

    Relevant code

    Note: the vendored EEGLAB checkout and network were unavailable in this runner, so the MATLAB source could not be re-read and no tools/gui_geometry/reference/pop_firwsord.json was added; a capture on jamming should confirm the columns. In the GUI path, the history command now includes the shown deviation for non-Kaiser windows (firwsord ignores it).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    function-parity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions