scaleogram icon indicating copy to clipboard operation
scaleogram copied to clipboard

Normalization of CWT magnitude

Open ghost opened this issue 5 years ago • 2 comments

Hi,

Thanks for producing this excellent piece of work, it makes producing wavelet plots very straightforward indeed. However, I do have a question about the magnitude output. If I have an input signal with two periodic components of equal amplitude, is it possible to normalize the cwt output such that the two components have equal magnitude in the cwt spectrum?

In the attached example I have two components with equal amplitude in the time domain but different magnitudes in the wavelet spectrum. I understand that this is possible in the Matlab cwt implementation: "The cwt function uses L1 normalization. With L1 normalization, if you have equal amplitude oscillatory components in your data at different scales, they will have equal magnitude in the CWT. Using L1 normalization shows a more accurate representation of the signal." (source: https://uk.mathworks.com/help/wavelet/ref/cwt.html#mw_ae84b041-f038-4c11-bf1a-6058481e25a8)

Can I do the same with your toolbox?

image

ghost avatar Sep 19 '19 11:09 ghost

Hi @banksii ,

have you used spectrum='amp' ?

This should solve your problem. The name used was not norm='XXX' as the real and imaginary part does not fit.

Maybe the spectrum parameter should be split into two parameters

  • output_component=(both|real|imaginary)
  • norm=(L1,L2, ...)

I set the enhancement label on this issue and keep it for a motivated future contributor or myself when I have more time.

alsauve avatar Oct 24 '21 15:10 alsauve

Just ran into a similar problem. I have a signal that is a sum of two sinusoids. Attached is the scalogram and the signal graph:

image

I set spectrum='amp', and yet the issue was not resolved.

Dymytriy-Zyunkin avatar Nov 12 '21 19:11 Dymytriy-Zyunkin