Skip to content
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

Normalization of CWT magnitude #3

Open
ghost opened this issue Sep 19, 2019 · 2 comments
Open

Normalization of CWT magnitude #3

ghost opened this issue Sep 19, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Sep 19, 2019

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

@alsauve alsauve added the enhancement New feature or request label Oct 24, 2021
@alsauve
Copy link
Owner

alsauve commented Oct 24, 2021

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.

@Dymytriy-Zyunkin
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants