You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Synchrosqueezing Toolbox ported to Python, authored by Eugene Brevdo, Gaurav Thakur. Original: https://github.com/ebrevdo/synchrosqueezing
2
+
[Synchrosqueezing Toolbox](https://github.com/ebrevdo/synchrosqueezing) ported to Python.
3
3
4
-
**Reviewers needed**; the repository is in a development stage - details below.
4
+
`ssqueezepy`'s come out of retirement; see [Releases](https://github.com/OverLordGoldDragon/ssqueezepy/releases). I've validated all main methods; the repo's now production-ready. The rest is a matter of extending.
5
+
6
+
Significant changes to some code structure are expected until v0.6.0, but whatever's not explicitly marked as problematic will work as intended. README will also change soon.
5
7
6
8
## Features
7
9
- Forward & inverse CWT- and STFT-based Synchrosqueezing
An eventual goal is a merged Pull Request to PyWavelets ([relevant Issue](https://github.com/PyWavelets/pywt/issues/258)). Points of review include:
14
-
1.**Correctness**; plots generated from CWT transforms resemble those in the publications, but not entirely
15
-
2.**Completeness**; parts of code in the original Github are missing or incorrect, and I'm unable to replace them all
16
-
3.**Unit tests**; I'm not familiar with Synchrosqueezing itself, so I don't know how to validate its various functionalities
17
-
4.**Licensing**; unsure how to proceed here; [original's](https://github.com/ebrevdo/synchrosqueezing/blob/master/LICENSE) says to "Redistributions in binary form must reproduce the above copyright notice" - but I'm not "redistributing" it, I'm distributing my rewriting of it
18
-
5. <s>**Code style**</s>; I'm aware PyWavelets conforms with PEP8 (but I don't), so I'll edit PR code accordingly
19
-
20
-
## Review To-do:
21
-
22
-
**Correctness**:
23
-
-[ ]1. Example 1
24
-
-[ ]2. Example 2
25
-
26
-
**Completeness**:
27
-
-[ ]1.`freqband` in `synsq_cwt_inv` and `synsq_stft_inf` is defaulted to an integer, but indexed into as a 2D array; the two have nearly identical docstrings, and reference the same equation, but the equation appears completely irrelevant to both.
28
-
-[ ]2.`quadgk` has been ported as quadpy's [`quad`](https://github.com/nschloe/quadpy/blob/master/quadpy/line_segment/_tools.py#L16) (linked its wrapped function), which does not support infinite integration bounds, and has [trouble](https://github.com/nschloe/quadpy/issues/236) with computing `synsq_stft_inv`'s integral. Needs a workaround.
29
-
-[ ]3. As seen in examples, the y-axis shows "scales", not frequencies - and the relation between the two is neither clear nor linear; it also isn't linear w.r.t. `len(t)`, `nv`, or `fs`. Publications show frequencies instead.
30
-
31
-
**Unit tests**: Whatever suffices for PyWavelets will suffice for me
32
-
33
-
## Implementation To-do:
34
-
One checkmark = code written; two = reviewed
35
-
36
-
| Status | Toolbox name | Repository name | Repository file |
There are more unlisted (see original repo), but not all will be implemented, in particular GUI implementations.
60
15
61
16
## Differences w.r.t. original
62
17
@@ -68,33 +23,11 @@ There are more unlisted (see original repo), but not all will be implemented, in
68
23
-**Edited docstrings**; filled missing info, & few corrections
69
24
-**Moved functions**; each no longer has its own file, but is grouped with other relevant functions
70
25
-**Code style**; grouped parts of code as sub-functions for improved readability; indentation for vertical alignment; other
71
-
-**Performance**; this repo may work faster or slower, as Numpy arrays are faster than C arrays, but some of original funcs use MEX-optimized code with no Numpy equivalent. Also using dense instead of sparse matrices (see below).
72
-
-**Performance**; this repo _will_ work **10x+ faster** for some of the methods which were vectorized out of for-loops
26
+
-**Performance**; this repo will work faster and for less memory for some methods (to be documented)
73
27
74
28
**Other**:
75
29
- Dense instead of sparse matrices for `stft_fwd` in [stft_transforms.py](https://github.com/OverLordGoldDragon/ssqueezepy/blob/master/synchrosqueezing/stft_transforms.py), as Numpy doesn't handle latter in ops involved
76
30
77
31
78
32
79
-
## Examples
80
-
81
-
See [examples.py](https://github.com/OverLordGoldDragon/ssqueezepy/blob/master/examples.py). Links to: [paper [1]](https://sci-hub.se/https://doi.org/10.1016/j.sigpro.2012.11.029), [paper[2]](https://arxiv.org/pdf/0912.2437.pdf). `_inv` methods (reconstruction, inversion) have been omitted as they involve `freqband`.
82
-
83
-
**EX 1:** Paper [1], pg. 1086
84
-
85
-
Only real components shown; imaginary are nearly identical, sometimes sign-opposite.
synsq-CWT (`synsq_cwt_fwd`) appears to produce strongest agreement with paper (FIG 4), while none of STFT yield any resemblance of anything in the papers. It's also unclear whether `synsq_squeeze` was used for "synsq" in FIG 4 instead.
Similar situation as EX 1; again CWT has close resemblance, and STFT is in a separate reality. The two apparent discrepancies w/ CWT are: (1) slope of the forking incline, steeper in FIG. 3; (2) position of horizontal line, lower in FIG. 3. As for the black lines in FIG 3, they seem to be the (manual) "markings" mentioned under the figure in the paper.
0 commit comments