Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request: scale weighted wavelets for cwt #783

Open
tjmier opened this issue Dec 4, 2024 · 1 comment
Open

Request: scale weighted wavelets for cwt #783

tjmier opened this issue Dec 4, 2024 · 1 comment

Comments

@tjmier
Copy link

tjmier commented Dec 4, 2024

In the mass spectroscopy field where CWT is popular for peak identification, it has been found that applying a scale dependent weighting function to the wavelet function improves accuracy.
DOI: 10.1109/ACCESS.2022.3220640
https://doi.org/10.1080/00032719.2023.2266207

The weighting function applied in these papers is

g(a)=1/e^a
w'(t)=g(a)w(t)

where g(a) is the weighting function,
a is the scale parameter in the CWT,
w(t) is the original wavelet function,
w'(t) is the weighted wavelet function

Having an optional parameter in the pywt.cwt function for a weighting function is the request. Currently my alternative is to create a new wavelet for each scale value and run pywt.cwt in for loop. Alternatively, if including too much parameter bloat in pywt.cwt is a concern, a new function can be made separately pywt.wcwt (weighted cwt).

Thanks!

@tjmier
Copy link
Author

tjmier commented Dec 4, 2024

quick correction.
I actually cannot find a way to customize a continuous wavelet object for cwt so I do have a work around for applying a weighting function. Any info on if I can implement this with the tools already available would be very much appreciated as well!

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

No branches or pull requests

2 participants