Skip to content

Filtering revamp#5

Draft
bboilot-ledger wants to merge 8 commits intomasterfrom
bbo/filtering_revamp
Draft

Filtering revamp#5
bboilot-ledger wants to merge 8 commits intomasterfrom
bbo/filtering_revamp

Conversation

@bboilot-ledger
Copy link
Contributor

@bboilot-ledger bboilot-ledger commented Oct 28, 2025

This PR adds the following changes:

  • Switch from biquad to sci-r
  • Create a filter designer menu
  • Support more advanced filters
  • Create/clear filters on the go

There is still one issue to address. The code is depending on qsib-cbie/sci-rs#80
We may need to wait for this PR to be closed in order to use the official sci-rs repository instead of my fork.

@kingofpayne
Copy link
Contributor

A few little remarqs here:

  • Displayed sampling rate in the dialog should be in MS/s, not in MHz
  • I would prefer not having colored buttons for apply/cancel
  • Apply should be on the right, cancel on the left
  • Frequencies input boxes visibility should depend the selected filter. egui makes it easy to implement, and that should remove some confuseness.
  • Maybe "Filter" instead of "Create filter" is better for the button in the toolbar.

This filtering tool will be awesome to release!

@bboilot-ledger
Copy link
Contributor Author

bboilot-ledger commented Oct 30, 2025

Displayed sampling rate in the dialog should be in MS/s, not in MHz

Nice catch!

I would prefer not having colored buttons for apply/cancel
Apply should be on the right, cancel on the left
Frequencies input boxes visibility should depend the selected filter. egui makes it easy to implement, and that should remove some confuseness.

Fair enough!

Maybe "Filter" instead of "Create filter" is better for the button in the toolbar.

OK. When a filter is applied, the button becomes "Clear filter". Do we keep it that way or do you have something else in mind?

Thanks for the feedback, I will rebase the branch and make the modifications 🙏

@kingofpayne
Copy link
Contributor

We can keep "Clear filter" I believe.

@bboilot-ledger bboilot-ledger marked this pull request as draft October 30, 2025 16:59
@bboilot-ledger
Copy link
Contributor Author

Fixed everything and disabled Cauer and Bessel filters as they're not yet implemented (https://github.com/qsib-cbie/sci-rs/blob/d0a35b49ca7c304c3cf2ff7e19255ec673d63df0/sci-rs/src/signal/filter/design/iirfilter.rs#L116-L126).
-> From my understanding, only the analog prototype is missing and doesn't seem difficult to implement it on our side for those 2 filters.

However, when working from my fork I had the latest commit of sci-rs but their latest crate version is 0.4.1 (released in Nov 2024) which does not support any filter :/
Put the PR as draft for the moment so we can discuss it.

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.

2 participants