Hi Supatat, Some of this has been discussed here:
You did not show the code that you used in both cases (old CWT api and new CWT api), but obviously we recommend the new API for a number of reasons.
In your specific case, if you are actually looking at the where the maximum values occur in the wavelet transform, then the old version is not recommend because it normalizes the wavelets using L2 normalization. That is discussed here:
In your case this means that the bandpass filter used has a peak amplitude that depends on the scale, the lower the scale the higher the amplitude. So it biases the results toward larger scales (or lower frequencies). The new CWT does not do that, all filters have the same magnitude in L1 normalization, that is a fairer picture. That is particularly true if you are looking at values. Qualitatively, it looks like the picture of the signal is the same in both othe old and new CWT, but the L2 normalization of the old API is biasing the results toward lower frequencies.
For example: Here we have two oscillations with unambigously unit amplitude. See that the new CWT gets it right.
Fs = 1e3;
t = 0:1/Fs:1;
x = cos(2*pi*32*t).*(t>=0.1 & t<0.3)+sin(2*pi*64*t).*(t>0.7);
cwt(x,1000)
Try the above example with the old CWT and you will see that the reported amplitude (magnitude) for the 32-Hz component is larger than the 64-Hz component and neither of them will be close to 1.
Hope that helps,
Wayne
Best Answer