PyWavelets / pywt

PyWavelets - Wavelet Transforms in Python
http://pywavelets.readthedocs.org
MIT License
2.02k stars 467 forks source link

feature request: synchrosqueezed wavelet transform #258

Closed rgommers closed 6 months ago

rgommers commented 7 years ago

Original feature request by @gabsee at https://github.com/scipy/scipy/issues/6888:

Is anyone savvy enough to add the new Wavelet Synchrosqueezed Transform (wsst) (including inverse iwsst) to SciPy?

WSST has recently been implemented in MATLAB (R2016a): https://au.mathworks.com/help/wavelet/ref/wsst.html

The method is based on these two papers:

  1. I. Daubechies, I., J. Lu, and H. T. Wu. "Synchrosqueezed Wavelet Transforms: an Empricial Mode Decomposition-like Tool", Applied and Computational Harmonic Analysis. Vol. 30(2), pp. 243–261.
  2. Thakur, G., E. Brevdo, N. S. Fučkar, and H. T. Wu. "The Synchrosqueezing algorithm for time-varying spectral analysis: robustness properties and new paleoclimate applications." Signal Processing. Vol. 93, pp. 1079–1094.

The second one contains the algorithm and is available from arxiv.

I have used this method a few times for research projects and it is fantastic! However, I am new to Python, so am unable to implement this (just yet). Availability of wsst/iwsst in SciPy would convince me to give up Matlab for good.

Many thanks for considering :)

rgommers commented 7 years ago

Seems interesting. There's Matlab code at https://github.com/ebrevdo/synchrosqueezing, but that's not usable right now. I've requested the author to add a license: https://github.com/ebrevdo/synchrosqueezing/issues/2

grlee77 commented 7 years ago

Looks interesting, but not something I have experience with.

There is an R port of that Matlab toolbox that is under an incompatible LGPL-2 license (https://cran.r-project.org/web/packages/SynchWave/index.html). Let's see wait and see what the author of that Matlab toolbox says regarding it's license.

gcrau commented 7 years ago

Thanks for considering this! I wish I could do this but my Python experience is too young ...

Here's an example of the difference between CWT and WSST for a bit of data figure-2_01 From: http://www.hydrol-earth-syst-sci.net/20/4439/2016/

WSST is a pretty neat method, devised by the "mother" of wavelet transforms ...

SebMilardo commented 5 years ago

Hi!

Any update about this issue? Is there any implementation of wsst in Python in this library or somewhere else?

prutschman commented 5 years ago

It appears that the https://github.com/ebrevdo/synchrosqueezing repo was placed under 2-clause BSD license about a week ago.

SebMilardo commented 5 years ago

This is great news! I was planning to port such library in Python (or at least part of it). Now that there is a license I think it should be possible to start this project and to share it on GitHub. What do you think?

grlee77 commented 5 years ago

This is great news! I was planning to port such library in Python (or at least part of it). Now that there is a license I think it should be possible to start this project and to share it on GitHub. What do you think?

I think there would be a lot of interest and it would be a good fit within PyWavelets. Rather than try porting the full toolbox at once, I would start with just the forward synchrosqueezed transform, ideally built based on the existing pywt.cwt implementation for the CWT.

OverLordGoldDragon commented 4 years ago

Am also interested; any progress since?

OverLordGoldDragon commented 4 years ago

@SebMilardo Have you worked on an implementation so far? I'm considering it, maybe we could collaborate.

OverLordGoldDragon commented 4 years ago

@rgommers @SebMilardo @gcrau @grlee77 I've began porting it, need reviewers - thread here.

gcrau commented 4 years ago

Happy to test the outcome using my dataset

rgommers commented 6 months ago

This is now available as https://github.com/OverLordGoldDragon/ssqueezepy, which looks really good.

@OverLordGoldDragon's comment at https://github.com/PyWavelets/pywt/issues/543#issuecomment-722651267 indicates it will stay a separate package. If there is interest in the future to merge the packages, that is still feasible. But @OverLordGoldDragon's reasoning about PR review and maintenance bandwidth on PyWavelets being (s)low still applies, so let me close this feature request now.

Thanks all!