OverLordGoldDragon / ssqueezepy

Synchrosqueezing, wavelet transforms, and time-frequency analysis in Python
MIT License
636 stars 96 forks source link

Extending ssqueezepy #8

Open OverLordGoldDragon opened 3 years ago

OverLordGoldDragon commented 3 years ago

NOTE: I'm no longer actively developing features for ssqueezepy. Requests can still be submitted, here if short, or as Issues if detailed. If I don't reply within a month, it's probably not happening. I may react with below emoji to confirm.

image

Contributions as Pull Requests are still welcome, but should mostly complete themselves.


Thread for tracking proposals for extending functionality.

1 checkmark = in progress; 2 = done

Status Description Code / Resources
1. [] [] padsignal: more methods in PyWavelets; pull?
2. [] [] padsignal: Interpolation, Fourier series extension
3. [] [] padsignal: Boundary wavelets are described as superior to zero-padding, periodic, and symmetric extensions
4. [] [] Generalized Morse wavelets "capture the essential idea of the Morlet, while avoiding its deficiencies ... may be recommended as an ideal starting point for general purpose use".
5. [x][x] Fast wavelets -- Implement wavelet recomputation in C or wrap `@numba.jit`
6. [] [] Cachelets -- Allow wavelets to be cached (on disk) for reuse; provide database of default-parameter wavelets computed for several common powers of 2
OverLordGoldDragon commented 3 years ago

2019 publication develops an adaptive SWT where the width of the wavelet is varied. This is further analyzed in a 2020 pub. Looks really interesting, seems to extend CWT's idea of varying the time-frequency basis (via scale) by a further degree (sigma here).

Add to ssqueezepy?

OverLordGoldDragon commented 3 years ago

Generalized Morse wavelets "capture the essential idea of the Morlet, while avoiding its deficiencies ... may be recommended as an ideal starting point for general purpose use". They're analytic, suitable for SSWT. Added to list, I might port/implement.

Below plots from 2009 paper; quality paper.

image

image

OverLordGoldDragon commented 3 years ago

MATLAB code for Adaptive CWT & SSWT. As far as I could tell, CWT is computed at least thrice, and it's for Morlets only. It would be a good addition, but I won't be porting.

mattbit commented 3 years ago

Hi @OverLordGoldDragon, interesting package! For Morse wavelets, I have coded a python version some time ago following the papers and code by Lilly & Olhede. It's quite rough and not thoroughly tested but I've been using it for some time and I get results comparable with the Matlab cwt implementation. Have a look and if you want I'm willing to integrate it here, if you could help me with reviewing the code, testing and adding missing functionalities.

OverLordGoldDragon commented 3 years ago

@mattbit Thanks for the offer; I've actually already implemented the wavelet, ported also from J-Lab, and will push it out after v0.5.0 (as I've yet to 'polish' it). Aside this and STFT, other additions are welcome - but best to ask just in case before putting effort into a PR.

OverLordGoldDragon commented 1 year ago

Account for window shape in determining # of frames? https://github.com/OverLordGoldDragon/ssqueezepy/issues/81#issuecomment-1361917439

HiperMaximus commented 1 year ago

What about exteding it for multidimensional data? 2D for images for example (maybe 3D for color images and volumes).

OverLordGoldDragon commented 1 year ago

@HiperMaximus Out of scope, I'm afraid. Also I'm no longer actively developing features, I've edited OP to reflect this.

Also my "adaptive SSQ" comment was before the drastic 0.6.0+ speedups, it now becomes feasible, and is worth developing (though I won't be).