feat(filter): add filter designer GUI tool#54
Merged
Conversation
Add a PyQt5 tool to build a chain of digital filters linked in series and view the combined magnitude/phase/group-delay response. - filter_library.py: pure numpy/scipy core with a data-driven registry of the 11 filter types, Filter and FilterChain (series convolution), and response helpers. No GUI dependency so it can be reused in the control loop of other tools (e.g. autotune). - filter_response_canvas.py: reusable 3-plot Bode canvas with a shift+click/drag red cursor reading out values at a frequency. - filter_edit_dialog.py: add/edit popup with live preview. - filter_chain_widget.py: embeddable table (show/edit/remove) + plot. - filter_designer.py: standalone app entry point.
- Move the table into a left panel (fs on top, table, Add button below), beside the plots. - Two-line filter rows: type name then parameters; shorten labels to f_c and BW. - Compact icon buttons (gear / cross) with columns and table sized to fit their contents exactly, no empty frame.
Drop the shift requirement so the frequency cursor is set and dragged with a plain left-click; shift+click still works.
- test_filter_library.py: pure core (coefficients, series convolution, summaries, response helpers). - test_filter_dialogs.py: add/edit dialog behaviour, headless. - test_filter_chain_widget.py: table, add/edit/remove (stubbed dialog), overlay toggling and stable trace colours. - filters_tests.yml: run the suite on PRs and master with Qt offscreen.
Default the per-row 'show' checkboxes to enabled so every filter's response is overlaid on the combined trace from the start.
Toggling a row's EN box now temporarily removes that filter from the chain: it no longer contributes to the combined response and its trace is hidden, while staying in the table so it can be re-enabled. Add enabled_chain() exposing just the active filters, and emit changed on toggle. Broaden the group-delay singularity warning suppression.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This tool is to see the effect of combining different filters together (gain, phase and group delay)

The response of the combined and individual filters is then shown

Currently includes all the filters that are existing in the digital filter compare script
