## 24 July 2012

### Coming to grips with the wavelet function

First off, OctConf was awesome! Meeting the other GSoC students and all the core developers was an awesome experience, and I hope I can go to more events in the future.

Now then. It is safe to say that the implementation of nurealwavelet() is in fact completely broken and may never have been meant to work. There's an infinite loop, there's an unused pointer, there's so many things wrong that I wonder how this article made it into print. On that note, I'm going to go over the entire function as it is represented in the paper here, and try to understand it. (In the following, the series is represented as a (t,ξ) series of complex values associated with a time series.)

$\bg_white \zeta _ { t, \omega } = \frac{ \sum _ { k \in K } w ( \sigma \omega ( t _ k - t ) ) e ^ { - i \omega ( t _ k - t ) } \xi _ k }{ \sum _ { k \in K } w ( \sigma \omega ( t _ k - t ) ) }$
From the context in the paper, it's clear that t has some import versus tk; unfortunately for me, how to use t is not at all clear. I am working from the assumption that t is supposed to be the centre of each window, and as such the proper implementation is to divide the range specified in the input by the number of intervals to determine the width of each interval (and thus the radius of said window being half again the width of the window), thus being able to apply the transform over the whole data set.

The problem that I've been avoiding so far is that the window changes as the frequency drops; a lower frequency requires a much larger window to define it, but this means the number of windows tested decreases, thus a matrix for storing results doesn't make sense, as it will become progressively more full of junk data/excess unused elements. I'm going to look for other wavelet transforms as they're performed with Octave to see what I can learn from others on how to implement this.

#### 1 comment:

1. Ben,

I'm tasked with looking into incorporating wavelets into our company's signal processing portfolio. I've seen a lot of work done with Wavelab 850. Have you looked into that toolbox yet? It says it is for MATLAB, but it supports such an old version of MATLAB (v6) that I'd bet Octave would support it. The only problem I could see is the mex functions. I bet you could get around that though. CWT and DWT with resolution analysis is already in it. I'm on the Octave developer's mail list if you would like to collaborate.

Jonathan