morlet wavelets and wavelet convolution · 2019-09-06 · morlet wavelet morlet wavelet– a sine...
TRANSCRIPT
![Page 1: Morlet Wavelets and Wavelet Convolution · 2019-09-06 · Morlet Wavelet Morlet wavelet– A sine wave that is “Windowed” (i.e., multiplied point by point) by a Gaussian Can use](https://reader030.vdocuments.us/reader030/viewer/2022040816/5e5fc8cc7d1b4b75ac0019ea/html5/thumbnails/1.jpg)
J A M I E E D G I N
F E B R U A R Y 1 8 , 2 0 1 4
Morlet Wavelets and Wavelet Convolution
![Page 2: Morlet Wavelets and Wavelet Convolution · 2019-09-06 · Morlet Wavelet Morlet wavelet– A sine wave that is “Windowed” (i.e., multiplied point by point) by a Gaussian Can use](https://reader030.vdocuments.us/reader030/viewer/2022040816/5e5fc8cc7d1b4b75ac0019ea/html5/thumbnails/2.jpg)
Last chapter: Fourier Transform and Fast Fourier Transform
Cannot tell changes in frequency structure over time Violates Assumptions of Fourier Analysis– EEG data are
not stable over time Solution? Do not use a temporally stable wave for
convolution Fourier Transform- KERNEL: Sine Waves (no temporal information
extracted because they have time constant oscillations) Wavelets are not time domain constant – a KERNEL that can extract
both frequency and time
Still have assumption of temporal stability to deal with, but now the EEG signal only has to be stable when the wavelet looks like a sine wave.
![Page 3: Morlet Wavelets and Wavelet Convolution · 2019-09-06 · Morlet Wavelet Morlet wavelet– A sine wave that is “Windowed” (i.e., multiplied point by point) by a Gaussian Can use](https://reader030.vdocuments.us/reader030/viewer/2022040816/5e5fc8cc7d1b4b75ac0019ea/html5/thumbnails/3.jpg)
Morlet Wavelet
Morlet wavelet– A sine wave that is “Windowed” (i.e., multiplied
point by point) by a Gaussian Can use other wavelets, but not are all well-suited Must taper to zero at both ends and have a mean
value of zero
![Page 4: Morlet Wavelets and Wavelet Convolution · 2019-09-06 · Morlet Wavelet Morlet wavelet– A sine wave that is “Windowed” (i.e., multiplied point by point) by a Gaussian Can use](https://reader030.vdocuments.us/reader030/viewer/2022040816/5e5fc8cc7d1b4b75ac0019ea/html5/thumbnails/4.jpg)
![Page 5: Morlet Wavelets and Wavelet Convolution · 2019-09-06 · Morlet Wavelet Morlet wavelet– A sine wave that is “Windowed” (i.e., multiplied point by point) by a Gaussian Can use](https://reader030.vdocuments.us/reader030/viewer/2022040816/5e5fc8cc7d1b4b75ac0019ea/html5/thumbnails/5.jpg)
Morlet (Gabor) wavelet
![Page 6: Morlet Wavelets and Wavelet Convolution · 2019-09-06 · Morlet Wavelet Morlet wavelet– A sine wave that is “Windowed” (i.e., multiplied point by point) by a Gaussian Can use](https://reader030.vdocuments.us/reader030/viewer/2022040816/5e5fc8cc7d1b4b75ac0019ea/html5/thumbnails/6.jpg)
Why use wavelets?
No time variance
strong time variance-less frequency precision
Box car- time and frequency- rough edges
wavelet- time and frequency- tapered edges
![Page 7: Morlet Wavelets and Wavelet Convolution · 2019-09-06 · Morlet Wavelet Morlet wavelet– A sine wave that is “Windowed” (i.e., multiplied point by point) by a Gaussian Can use](https://reader030.vdocuments.us/reader030/viewer/2022040816/5e5fc8cc7d1b4b75ac0019ea/html5/thumbnails/7.jpg)
Make a Wavelet!
Parameters to set
srate = 500; % sampling rate in Hz f = 10; % frequency of the sine wave in Hz, wavelet
“peak” frequency time = -1:1/srate:1; % time, from -1 to 1 second in
steps of 1/sampling-rate
![Page 8: Morlet Wavelets and Wavelet Convolution · 2019-09-06 · Morlet Wavelet Morlet wavelet– A sine wave that is “Windowed” (i.e., multiplied point by point) by a Gaussian Can use](https://reader030.vdocuments.us/reader030/viewer/2022040816/5e5fc8cc7d1b4b75ac0019ea/html5/thumbnails/8.jpg)
Make a sine wave
sine_wave = exp(2*pi*1i*f.*time);
![Page 9: Morlet Wavelets and Wavelet Convolution · 2019-09-06 · Morlet Wavelet Morlet wavelet– A sine wave that is “Windowed” (i.e., multiplied point by point) by a Gaussian Can use](https://reader030.vdocuments.us/reader030/viewer/2022040816/5e5fc8cc7d1b4b75ac0019ea/html5/thumbnails/9.jpg)
Make a Gaussian!
s=6/(2*pi*f); (width, SD of the Gaussian) gaussian_win = exp(-time.^2./(2*s^2)); “M” is deleted- not relevant for eeg
wavelet = sine_wave .* gaussian_win;
Exp=“complex”= no amplitude adjustment??? f = frequencyValue of 6 set here for “n”- number of wavelet cycles
(tradeoff between temporal and frequency precision)
![Page 10: Morlet Wavelets and Wavelet Convolution · 2019-09-06 · Morlet Wavelet Morlet wavelet– A sine wave that is “Windowed” (i.e., multiplied point by point) by a Gaussian Can use](https://reader030.vdocuments.us/reader030/viewer/2022040816/5e5fc8cc7d1b4b75ac0019ea/html5/thumbnails/10.jpg)
What happens when we change n?
Time-frequency tradeoffs in precision Why?
![Page 11: Morlet Wavelets and Wavelet Convolution · 2019-09-06 · Morlet Wavelet Morlet wavelet– A sine wave that is “Windowed” (i.e., multiplied point by point) by a Gaussian Can use](https://reader030.vdocuments.us/reader030/viewer/2022040816/5e5fc8cc7d1b4b75ac0019ea/html5/thumbnails/11.jpg)
“Family of Wavelets”
Similar to decomposition with sine waves of different frequencies in FFT, time-frequency decomposition involves wavelets of different frequencies
To make a family you change the frequency of the sine wave while leaving other parameters unchanged
UNLIKE FFT: You can specify and use as many wavelets as you want
![Page 12: Morlet Wavelets and Wavelet Convolution · 2019-09-06 · Morlet Wavelet Morlet wavelet– A sine wave that is “Windowed” (i.e., multiplied point by point) by a Gaussian Can use](https://reader030.vdocuments.us/reader030/viewer/2022040816/5e5fc8cc7d1b4b75ac0019ea/html5/thumbnails/12.jpg)
Theoretical and Practical Limits
You cannot use frequencies slower than your epochs – if you have 1 secs of data, you cannot analyze below 1 hertz. It’s best to have several cycles of activity, analyze 4 hertz and faster
Cannot use frequencies above the Nyquist frequency (one-half the sampling rate)
Frequency smoothing occurs so that close frequencies will produce identical results (too many will increase computation time)- between 15 to 3o frequencies, spanning 3 to 60 hz should be sufficient for your “family”
![Page 13: Morlet Wavelets and Wavelet Convolution · 2019-09-06 · Morlet Wavelet Morlet wavelet– A sine wave that is “Windowed” (i.e., multiplied point by point) by a Gaussian Can use](https://reader030.vdocuments.us/reader030/viewer/2022040816/5e5fc8cc7d1b4b75ac0019ea/html5/thumbnails/13.jpg)
Another point
The frequency information you obtain at one time point is a weighted sum of the frequency information at surrounding time points.
In interpreting time-frequency results, each time point is an estimate of instantaneous activity influenced by neighboring activity.
![Page 14: Morlet Wavelets and Wavelet Convolution · 2019-09-06 · Morlet Wavelet Morlet wavelet– A sine wave that is “Windowed” (i.e., multiplied point by point) by a Gaussian Can use](https://reader030.vdocuments.us/reader030/viewer/2022040816/5e5fc8cc7d1b4b75ac0019ea/html5/thumbnails/14.jpg)
A family (12.4 figure)
![Page 15: Morlet Wavelets and Wavelet Convolution · 2019-09-06 · Morlet Wavelet Morlet wavelet– A sine wave that is “Windowed” (i.e., multiplied point by point) by a Gaussian Can use](https://reader030.vdocuments.us/reader030/viewer/2022040816/5e5fc8cc7d1b4b75ac0019ea/html5/thumbnails/15.jpg)
Color equals amplitude
Movie = 1 line
![Page 16: Morlet Wavelets and Wavelet Convolution · 2019-09-06 · Morlet Wavelet Morlet wavelet– A sine wave that is “Windowed” (i.e., multiplied point by point) by a Gaussian Can use](https://reader030.vdocuments.us/reader030/viewer/2022040816/5e5fc8cc7d1b4b75ac0019ea/html5/thumbnails/16.jpg)
Another way to think of it: Band pass filtering
Convolution with Wavelets at certain frequencies is like band pass filtering
Reflects activity at peak frequency of the wavelet (6 hertz in next slide), but also activity from a weighted combination of surrounding frequencies (3hz to 9 hertz)
![Page 17: Morlet Wavelets and Wavelet Convolution · 2019-09-06 · Morlet Wavelet Morlet wavelet– A sine wave that is “Windowed” (i.e., multiplied point by point) by a Gaussian Can use](https://reader030.vdocuments.us/reader030/viewer/2022040816/5e5fc8cc7d1b4b75ac0019ea/html5/thumbnails/17.jpg)
Raw eeg
Frequency representation Wavelet. * EEG data
Wavelet looks like Gaussian
Convolution in time domain is multiplication in the frequency domain..
Ifft =
![Page 18: Morlet Wavelets and Wavelet Convolution · 2019-09-06 · Morlet Wavelet Morlet wavelet– A sine wave that is “Windowed” (i.e., multiplied point by point) by a Gaussian Can use](https://reader030.vdocuments.us/reader030/viewer/2022040816/5e5fc8cc7d1b4b75ac0019ea/html5/thumbnails/18.jpg)
Make Figure 12.5
![Page 19: Morlet Wavelets and Wavelet Convolution · 2019-09-06 · Morlet Wavelet Morlet wavelet– A sine wave that is “Windowed” (i.e., multiplied point by point) by a Gaussian Can use](https://reader030.vdocuments.us/reader030/viewer/2022040816/5e5fc8cc7d1b4b75ac0019ea/html5/thumbnails/19.jpg)
Imagine this! There are limitations…
“Real” morlet wavelets act as bandpass filters, but in time-frequency analysis, we need power and phase information too…
Convolution with the morlet wavelet depends on phase offsets.
Without help from more dimensions (imaginary ones), we would have to line up the wavelet so it was at zero degree lag with the EEG data each time.
![Page 20: Morlet Wavelets and Wavelet Convolution · 2019-09-06 · Morlet Wavelet Morlet wavelet– A sine wave that is “Windowed” (i.e., multiplied point by point) by a Gaussian Can use](https://reader030.vdocuments.us/reader030/viewer/2022040816/5e5fc8cc7d1b4b75ac0019ea/html5/thumbnails/20.jpg)
Dot product depends on relative phase
Wavelet at 10 hertz
One-cycle sine wave at 10 hertz
![Page 21: Morlet Wavelets and Wavelet Convolution · 2019-09-06 · Morlet Wavelet Morlet wavelet– A sine wave that is “Windowed” (i.e., multiplied point by point) by a Gaussian Can use](https://reader030.vdocuments.us/reader030/viewer/2022040816/5e5fc8cc7d1b4b75ac0019ea/html5/thumbnails/21.jpg)
What to do? Complex wavelets!
Can not only bandpass filter the data to extract frequency, but allows for time-frequency power and phase information
Real Complex