-
-
Notifications
You must be signed in to change notification settings - Fork 475
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
improve CWT docs #387
improve CWT docs #387
Conversation
Codecov Report
@@ Coverage Diff @@
## master #387 +/- ##
=======================================
Coverage 84.26% 84.26%
=======================================
Files 22 22
Lines 3540 3540
Branches 600 600
=======================================
Hits 2983 2983
Misses 489 489
Partials 68 68
Continue to review full report at Codecov.
|
Good idea. Covers all wavelet types and looks correct from a quick read. |
LGTM. I've added a commit with some typos and more doc formatting fixes. |
thanks. the edits you made look good to me |
Okay, in it goes then. Thanks @grlee77! |
Hi, I also agree that an improvement is needed, especially since the definition of the morlet function differs from the one in the seminal paper on CWT. ...is this already live? it doesn't look so here Thanks |
Thanks for asking. There was an issue in this PR that broke the doc build on readthedocs. I just pushed a fix in commit a057128, so it should appear within 15 minutes or so. |
Hi, it's live thanks @rgommers however, why you opted for such different definition ? even It seems impossible to find a Thanks |
The normalization used here is consistent with the definition in Matlab and their documentation references the following source: I accessed that text electronically via my university library and they state that this form makes the L1-norm of the wavelet equal to 1 (and that it's Fourier transform will have a peak value of 1). A quick numerical check seems to verify this claim: import pywt
import numpy as np
wav = pywt.ContinuousWavelet('cmor')
psi, x = wav.wavefun()
dx = x[1] - x[0]
L1 = np.trapz(np.abs(psi)) * dx # L1-norm is the integral of the magnitude
print("Integral of magnitude = {}".format(L1)) I am not sure the reason one would use this normalization vs. others. Unfortunately my expertise in the CWT is limited and the author of the CWT routines in PyWavelets hasn't been active here lately. I think in typical applications the absolute normalization shouldn't be too important? Isn't one typically looking for features in a spectrogram where a global scaling of the plots shouldn't matter? |
We could perhaps add a reference to the Teolis text to the docs as the source of the equations stated in that section. I had transcribed the equations based on inspection of the numpy functions in the test suite. I tried to double check things, so hopefully there are no typos. |
Document the equations for the CWT wavelets.
see #386
mathjax renders the equations like: