grinsted / wavelet-coherence

A cross wavelet and wavelet coherence toolbox for MATLAB
Other
137 stars 58 forks source link

Questions about`smoothwavelet.m` #1

Closed fzhu2e closed 7 years ago

fzhu2e commented 7 years ago

Hi Dr. Grinsted, I have some questions about smoothwavelet.m and I have sent you an email about two weeks ago.

Basically, I cannot follow the code that implements Eqs. 8-10 in Grinsted et al 2004. In the paper, it is mentioned that there are two normalization coefficients c1 and c2 that should be determined numerically, and I was wondering what's the specific way to do that. In the code, exponential power is used, which is not mentioned in the paper, and I am not sure which part of the code represents c1 and c2.

Could you shed some light on that? Thanks!

grinsted commented 7 years ago

Please note that there are some typos in the equations right at the point you are asking about. The code is correct. An alternative description of what is going on can be found here: http://paos.colorado.edu/research/wavelets/interdecadal.pdf

The key is that the two smoothing operators have to be normalized. The two constants do not have to be determined empirically, if you know how they should be normalized. The intent of introducing c1 & c2 was just to avoid writing out the full normalization constants. Unfortunately it came out garbled in the final version of the paper.

It is easiest to understand c2. In this case I design kernel so that sum(kernel)==1.