Now I’m going to introduce you to another method for doing time frequency analysis, and that is called the short time. Fourier transform, typically abbreviated as the St short time Fourier transform, sometimes also called the short time fast Fourier transform. Because, of course, you don’t actually use the discrete time. Fourier transform algorithm use the fast Fourier implementation now the short time. Fourier transform is actually really intuitive. This is the method for time frequency analysis that you would come up with on your own if you knew about the. Fourier transform. And you didn’t know anything about any other methods for time frequency analysis. Here you see a slide that we saw at the beginning of this section when I was talking about the Fourier transform as computing, the dot product between this kernel and this entire signal and then so I use that as a pivot to start talking about wavelets and convolution, but you might have thought up a different answer, so remember that the question was. How can we adapt this? Fourier transform procedure, so that instead of waiting all time points equally, we can focus the analysis on one specific time window, for example, this time window or this time window, so with Wavelet convolution, we came up with the solution of taking this kernel and sliding it along the data, but you might also have come up with a solution of instead of doing the Fourier transform on the entire signal. You only do the Fourier transform on one little segment of the signal that gives you the spectral characteristics of this window of time, and then you would move that and do this window of time in this window of time and so on and that really is simply how the short time? Fourier transform works. So here, you see a signal, a time domain signal and then what we do is we cut out one snippet one epoch of this signal, and that gives us a smaller signal that looks like this. It gets tapered to attenuate the edges here at the beginning and at the and then we take the Fourier transform of the tapered version of the signal and then compute the power spectrum or maybe the amplitude spectrum. That might look something like this. And now what you do is you take this power spectrum, and you rotate it and color it. So here frequency is on the X Axis and here frequency is on the Y axis and here power is on the Y axis and here color. Is, you know it’s like the Z axis? It’s the color axis, so this would be darker colors and down here would be lighter colors. So this result that I just explained gives you one column in this time frequency matrix, and then what you do is you take this window of time and you slide it over by, you know, maybe a hundred milliseconds or maybe you slide it by 50 milliseconds or 200 milliseconds How much you slide it over is a parameter of the analysis. It’s up to you, and then you repeat the whole procedure. One interesting difference between the short time. Fourier transform and Wavelet Convolution is with wavelet convolution. We build up the time frequency plane, one frequency at a time for all time points and here with short time. Fourier transform. We are building up the time frequency plane. One time point at a time or one time chunk at a time over all frequencies, so we get all frequencies at once for and then we’re looping over the different time points. Now you will also recognize this mechanism from Welch’s method, which I discussed towards the end of the previous section. So again, this is a slide copied from an earlier video and here. I talked about Welch’s method and I said that when we get all of these different power spectra from all these little snippets of the data, what we do is average them all together, so we average all of these individual snippets together and that gives us one spectrum for the entire signal. So now you can see that the for the short time. Fourier transform is essentially the same procedure, except at the end. We’re not averaging these spectra together. We are keeping them separate and putting them as columns into a time frequency plane. There are several parameters that you can adjust in the short time. Fourier transform that includes the size of the window and the size of the window here is going to determine not only the temporal precision, but also the spectral resolution, of course. Because if your time windows are really narrow, you have very few data points, so you don’t have a lot of frequencies between 0 and Nyquist as the time windows get longer. Do you have more frequencies? So the frequency resolution will increase, but that also means that the temporal precision is going to decrease because you are integrating activity over longer periods of time, so the width of this window is one parameter. The amount of overlap that you have between successive windows is also a parameter. If you want to have more overlap, that’s going to give you a smoother time frequency plot, but it’s also going to take longer so the computation time increases, and then there’s also the option to change the size of the time windows with different frequencies. This is the way of balancing the time frequency trade-off with short time. Fourier transform, so with wavelets, we could change this time frequency trail or adjust this time frequency precision balance by using a different number of wavelet cycles or a different full width at half maximum for the Gaussian as we increase in frequency here with the short time Fourier transform what you can do is change the window of time. You have four different ranges of frequencies, so you can see that with a short time. Fourier transform. There’s quite a lot of parameters that you can pick so this can make the analysis more flexible. It can also make the analysis more confusing and difficult because you might not know how to select these different parameters, and it also makes the analysis take longer because in a method like this, for example, you’re doing lots and lots of FFTs. You’re doing three FFTs by this For each time point, you’re doing three separate FFTs to get three different spectral resolutions that said the results of the short time Fourier transform will generally look really really similar to the results of complex Morley Wavelet convolution and the results of the short time. Fourier transform will look a lot like the results of the filter. Hilbert method. So these three methods wavelet convolution filter, Hilbert and short time Fourier transform are not really fundamentally different from each other. There are some reasons to prefer one method over the other. And that is something that. I am going to discuss in more detail in a video very soon. That video is called comparing wavelet filter Hilbert and short time FFT.