# wavelets

When we take a fourier transform, we assume that the frequencies are stationary: they don't evolve over time. But what if they do? Then, instead of convolving with sines and cosines to find the presence of each frequency, we instead convolve with windowed sines and cosines. Basically, the window tapers a sine/cosine so that we can tell if a frequency is present at a certain time \(t\) and not outside of it.

The morlet wavelet is often used for EEG data because it has a good balance of temporal/frequency resolution:

- temporal resolution: how precisely can I distinguish when a frequency occurs?
- frequency resolution: how precisely can I distinguish between frequencies?
- these are in conflict due to the uncertainty principle
- If my wavelet were "wider" I could capture more time, and distinguish between more frequencies, but I would lose temporal resolution

## 1. continuous wavelet transform vs STFT

- the STFT uses the same time and frequency resolution for all frequencies and all times
- the CWT can be adjusted so you have more temporal resolution for higher frequencies (you might want this if you think the higher frequency bursts will be shorter)
- usually, the width of the transform is set to be inversely proportional to \(f\) (see morlet wavelet for more discussion)

## 2. parameters

- see the MNE source for clear layout
- there is a width – this controls the temporal resolution
- there is a n
_{cycles}– this controls the temporal resolution/ frequency resolution tradeoff??? - there is the frequency of interest

- see also this pedagogical article by michael cohen