Open mattcbro opened 2 months ago
Could you provide your definitions for chirp
and wave
? When I just take the front page example and do cwt(f * (1.0+1.0im), c)
, it works just fine, so I suspect its either the particular wavelet, or there may be something odd about the shape of chirp
.
It's nothing to do with the chirp. It's the fact that the waveform is complex. As a matter of fact this problem occurs throughout a lot of the DSP related packages. See the simple example below:
using ContinuousWavelets
x = randn(1024) + 1im * randn(1024)
wave = wavelet(Morlet(π), averagingType=NoAve(), β=2)
# works
yt = cwt(real.(x), wave)
# doesn't work
yt = cwt(x, wave)
Ok this narrows it down to averagingType=NoAve()
, since the same example works if I set averagingType=Father()
. Shouldn't take too long to fix. Thanks for the issue
My use case for wavelets involves analyzing complex baseband signals like chirps and tones. This crashes the wavelet transform, e.g.
chirp is a length 2048 complex chirp signal.
I think I can work around this by separately taking the cwt() operation of the real and imaginary parts, but I don't see why these transforms don't work out of the box on a complex vector.