-
-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Proof of concept on how to fix issues #531, #535 and #570 #574
base: main
Are you sure you want to change the base?
Proof of concept on how to fix issues #531, #535 and #570 #574
Conversation
Thanks for looking at this @amanita-citrina. I will ping @OverLordGoldDragon, who has also been looking at CWT recently (e.g. #570), for awareness. In general, it will be good for PyWavelets to have additional contributors working on CWT because I am personally more familiar with the DWT and SWT code. There are probably other test cases comparing to legacy Matlab outputs that will fail here, but I don't know that we need to maintain that compatibility long-term going forward. Matlab's own CWT since 2015 or so has defaulted to a newer implementation and no longer matches the behavior that those cases tested against. |
Had a look; this looks more like a PR for Low scales are indeed challenging, and The interpolation idea for resampling seems to have potential, so I wouldn't toss the idea - just need to rework the resampling length. Behavior at low scales should be verified with test signals, for example as here (code provided); I haven't done it for your PR. Whatever the case, I'd suggest against ridding of integrated wavelet, as it's a unique alternative to other implementations that works well and may be further improved. (And no, it's not quite undone by |
My tentative pull request addressed three different issues, which in retrospect was not a great idea. In my opinion, the most important issue is the artefacts at low scales (high frequencies). These are due to incorrect sampling instants (issue #531), easy to notice in a plot and very confusing. In fact, I gave up on pywt for my application because I did not trust the results. There are several ways to get rid of the artefacts:
I favour interpolation (perhaps combined with someewhat increased precision) because it addresses the root problem - incorrect sampling instants - in a low-complexity way. Also, it is very easy to integrate in the current implementation. Some quick remarks on the other issues addressed in my pull request:
|
@amanita-citrina Have you tried But yeah, tackling multiple issues in one PR isn't a safe bet. |
This pull request is intended as a proof of concept to fix several issues of the CWT:
precision
in CWT, increase default to 12 #570 Allow user to set precision in CWTThe issues are due to some pecularities of the CWT implementation:
precision
in CWT, increase default to 12 #570.precision
in CWT, increase default to 12 #570). As far as I understand, the integration/differentiation step is not necessary at all and can be omitted.This pull request is intended as a starting point to remedy these problems.
The attached plots show that the problems described in #531 and #535 are no longer visible.
Nevertheless, there are some open issues that have to be addressed:
There are at least two alternatives: