-
Notifications
You must be signed in to change notification settings - Fork 36
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
Analytic Morse may be ill-defined for even lengths #13
Comments
Adding Nyquist also swaps symmetries of time-domain wavelet, peaking real component at center as probability distribution; comparison with and without Nyquist bin, both "adjusted" with halving: This breaks symmetry in the standard sense, as even-length sequences can't have a discrete center, but makes it DFT-symmetric (or "periodic"), which has more desired properties in spectral analysis (stronger decay). Also applies to odd And finally comparing all adjustments vs original: So at least for time-domain representation the adjustments seem desired; unsure about halving in CWT, but adding the Nyquist bin does come with increased "dynamic range" of frequencies (greater max center frequency), and the Nyquist bin is uniquely consistent for every sequence length (i.e. |
Time resolution integrals for original vs fully-adjusted; results still differ significantly from theoretically-predicted values (i.e. compute at greater scale with proper decay, then divide): Note that |
Found concrete benefits to CWT in implementing both adjustments:
All illustrated below: I did not, however, find any time resolution benefits, testing on rapid sine-FM signals, the CWT's were exactly same except for exact expected difference of half a Nyquist bin, suggesting behavior to change only in frequency-domain interactions. I've used Morlet w/ ssqueezepy.cwt, but key behavior will be same with Morse. (p.s. I'm also porting Morse into ssqueezepy). |
Thank you for open-sourcing this.
Looking at definition of analytic signals, I've noted the transform from real to analytic to be
s(t) -> s(t) + js^(t)
, i.e. the real part is preserved. For even lengths, however, as per Hilbert transform, this requires us to halve the dc and Nyquist bins (or double others):Here is tail behavior comparison of original and adjusted time-domain wavelets (
psi
):Adjusted properly decays to zero; this enables stable and accurate computation of wavelet time resolution for low scales (otherwise
t**2
in variance integral won't bound).However, another point of concern: there is no Nyquist bin:
psif(N/2+1) == 0
. Whether the bin belongs to positives or seems arbitrary, but in terms of basis functions the two are equivalent so one might say "both", where again it makes sense to halve it to "zero the negative half". More importantly the code above fails to yieldreal(xa) == real(x)
without it. Above plots were produced without Nyquist bin; I've yet to investigate behavior with vs without, will update.The text was updated successfully, but these errors were encountered: