How to set scales for cwt?

818 views
Skip to first unread message

Adam Smith

unread,
Jun 2, 2017, 8:47:54 PM6/2/17
to PyWavelets
Here's a question, for which I'd be grateful.

I'm confused on how to set the scales for a continuous wavelet transform. I think that what I'm doing right now would literally take months (literally) to complete, and I'm probably doing something wrong.

I'm looking at some very high-frequency data. The frequencies inside of it are on the order of 30 kHz. I'm trying to test for signal between 15 kHz and 60 kHz. The data itself is sampled at about 300 kHz.

So I'm using the complex Morlet wavelet. I set the wavelet's center_frequency to be 30000. Then I try to adjust the scales parameter for the cwt(), so that the frequencies returned are 15 kHz to 60 kHz (logarithmically scaled). Right now I set the scales from 300000 / (15000 / 30000) to 300000 / (60000 / 30000). (The 300k is for the sampling rate of the data, the 15k and 60k are the edges of where I want to do the transform, and the 30k is for the central frequency.) I tell it to go...and it doesn't finish in a reasonable amount of time.

Can anyone tell me what I'm doing wrong?

Thanks.

Adam Smith

unread,
Jun 5, 2017, 3:27:21 AM6/5/17
to PyWavelets
I reworked some of my math. I think it would take days to complete, not months--but that's still too long. The calculation time appears to be linear with respect to the center frequency. That doesn't make sense to me--shouldn't the center frequency adjust the wave, but not the Gaussian envelope? It doesn't seem like it should change the range of "support" for the function, meaning that it shouldn't need to calculate more values in order to calculate the convolution. I think that there's some fundamental point that I'm not understanding.
Reply all
Reply to author
Forward
0 new messages