So far, we've been talking about one dimensional functions and their Fourier transforms. We've learned that to take a Fourier transform means to decompose a complicated function into a series of simple sine waves. The idea is that if you were to add those sine waves back up together, adding them together you would recover the complicated function that you began with. But in microscopy, we dont deal with one-dimensional functions, rather we record two-dimensional images. So the next subject is a two-dimensional Fourier transform. So to introduce one-dimensional Fourier transforms, I showed you, how you could take a series of one-dimensional sine waves, and add them up to get a complex function. To introduce two-dimensional Fourier transforms, I'd like to start with the same thing. I'd like to add some two-dimensional sine waves together to start to form a more complicated picture. In a one-dimensional sine wave, we have a variable. And the value of the function rises and falls in an oscillatory pattern as a function of that variable. In a two-dimensional sine wave, we have two variables that define a plane. And the value of the function either rises or falls depending on the position within that plane. So for instance, a two-dimensional sine wave, I can represent with this piece of paper. If each position in space here on this plane is a position defined by an x and a y variable, the value of the function I could then represent as the height of the piece of paper. And so one two-dimensional sine wave looks like this in that it, it rises. If this dimension is x and this dimension is y, this two-dimensional sine wave rises at low x, and then as x increases, it goes through 0. And then it has a minimum here. And then it comes back to 0. So that's a two-dimensional sine wave that varies with x. A two-dimensional sine wave that varies with y would look, instead, like this, because it would rise at low y, go back to 0, have a minimum, and then come at, at, at higher values of y back to 0. So this is a two-dimensional sine wave. Now to look at more complicated two-dimensional sine waves, I've written just a simple program that I can use to create a space and then add sine waves to it. So to create a space, here my dialog box says, New Image Dimension. I'm going to pick a dimension of, let's say, 800 pixels. And it gives me a space a plane of 800 pixels in x, and 800 pixels high in y. And what I'll do is add a sine wave to that plane. Now, two-dimensional sine waves are characterized by two parameters, h and k. These are called Miller indices and we'll talk more about them later. But they represent how many oscillations along x this wave has, that's the value h. And how many oscillations there are in y, that's the index, k. So for instance a, h equals 1 and k equals 0 wave with an amplitude of 1 and a phase of 0, looks like this. So what's happening here is the value of the function starts at 0 here along this left side of the, of the box and then the value of the function arises, which is represented by brighter pixels here, and as it's a quarter the way across the box you have a crest arise here. And then as we move to higher x values, it falls back to 0, and then you have the minimum at three-quarters of the way across the box in x, you have a minimum, represented by the darkest pixels, and then it rises again back up to zero. This is the one-zero wave. In the piece of paper, this was the first wave that I showed like this. Okay, now let's look at a different wave. I'll create another box, again of dimension 800, and let's add a sine wave. Instead of the one, zero sine wave, this time let's add the zero, one. So now it should oscillate no times along x and 1 oscillation along y, and again, let's give it an amplitude of 1 and phase of 0. Now this is the wave that we get. Now in the way I've created the program, down here is the 0, 0 coordinate. And y increases as you go up the box in this way. And so, because of that, here along the x-axis, are the value, the function starts at a value of 0. And then as we move into positive values of y at a quarter of the way across the box we reach a maximum of 1. So that's the first crest. And then the function falls to 0, and then it approaches its first minimum, here three-quarters of the way across the box, and then it recovers back to 0 as it goes across. That's the zero, one wave. Now let's look at another wave. This time, let's add a 1, 1 wave. Now this should have one oscillation across the box in x and another oscillation across the box in y. And we'll, again, get an amplitude of 1 and phase of 0. Now you can see this is a diagonal sine wave. It starts at 0, 0, it starts at the function, the value of the function is also 0, but as you increase in x it, it rises to a maximum a quarter of the way across the box then back to 0 and then it goes to a minimum three-quarters of the way across and then back up to 0 just like the 1, 0 wave did. But in, but this one, as soon as you move off the x-axis, it behaves differently. Now in y, at y equals 0, it starts at 0 and rises to a maximum, a quarter of the way across, and then a minimum here at three-quarters of the way across the box and then back up to 0. And so along this y-axis, it behaves just like the 0, 1 wave. But anywhere where the value of x and y are both non-zero, then you have a combination of position and a diagonal wave going across the box at 45 degrees. Now let's look at the role of phase. Now let's look at the 1, 1 wave with an amplitude of 1. But instead of a phase of 0, this time let's give it a phase of 180 degrees. Now what's happened is we've shifted the whole wave forward by half of a wave length. So here we start at 0 again, but instead of heading towards a maximum we're now already half-way through the wave. And so we're heading down towards the minimum. And then we rise to the maximum and then go down to another minimum and cross the box. So you see the phase takes the exact same shape of the wave, but it shifts it left or right, or forward or backward. And 180-degree phase shift is half of a wavelength, and so it shifts it halfway. A 90 degrees phase shift would just be a quarter of the way. 270 degrees would be three quarters of the way. And so that's the role of phase. Now let's look at combinations of waves. If we give ourselves a surface, and let's add a 1, 0 wave with an amplitude of 1. And this time, let's use a phase of 90 degrees. Okay, so you're familiar with the shape. It's it oscillates only in x and now because we gave it a 90 degrees phase shift, it starts already a quarter of a wavelength. So it starts at this maximum. And then it falls to 0, goes to its minimum, and then rises back to the maximum at the other side of the box. Now that we have one wave in our picture, let's add another wave to our picture. This time, let's add a little bit of 0, 1, with an amplitude of 1. And to make it simple, let's use a phase of 0. Now we've added two waves to our image. And the system is more complicated because now as it, as we move forward through the y-coordinates, the 0, 1 wave starts at 0, it rises to a maximum, and you can see now we have a maximum here progressing down towards a minimum, and then rising back to a maximum. But now, we have the interference of two different waves that are being added on top of each other. Now, their amplitudes were both 1. Let's look at what happens if we add a wave which a, with a much higher amplitude. Let's say a 1, 1 wave which you'll remember is diagonal across the box, but this time let's give it an amplitude of 100 and a phase of 0. And, now what you see is it completely dominates the picture. Because there's 100 times as much of this 1, 1 wave as either of the other two. And so by eye, it looks essentially like a 1, 1 wave. There is in fact a little bit of deviation there, but you can hardly see it. And so the amplitude tell you how much of each wave is present in the image. Now let's look at some more complicated waves. Actually let's, let's get ourselves a clean screen and look at some more complicated waves. Let's add a 1, let's add a 2, 0 wave with amplitude 1 and phase 0. Now what we have is two oscillations across the box in x. That's what you get with h equals 2. And no oscillations across the box in y. That's what you get with k equals 0. So it starts at 0 and it rises to a maximum, falls to a minimum, rises to another maximum, falls to a minimum, and rises back to 0. Two wavelengths across the box. Just for completeness, let's look at that from the other dimension. If we had a h equals 0, let's say k equals 3, can you guess what we'll get? Did you guess a wave that had no oscillations in x that oscillated 3 times across the box in y, starting at 0, rising to a maximum, minimum, another maximum, a minimum, another maximum and a minimum and back to 0. So h and k tell you how many oscillations there are across the box in x and y. Let's try something even more complicated. What about an h equals 2 and a k equal 5 wave? Again with an amplitude of 1 and a phase of 0. Now what we have [COUGH] is a wave, which oscillates if you look carefully along any x, you'll see that the function [COUGH] rises to one maximum, a minimum, another maximum, a minimum, and then it comes back to 0. Two wavelengths across the box in x. But [COUGH] in y in any location, you'll see five wavelengths across the box, so we rise to a maximum, another one, third one, fourth one, fifth one before we cross the box. So this is a 2, 5 wave. Now let's look at what a negative k value means. What would a 1, minus 1 wave look like? Well, the answer is it looks like a 1, 1 wave. But instead of having the crest headed towards the upper right corner, now the crests are headed down towards the lower right corner. In other words, a wave, the 1, 1 wave headed up and to the right, the 1, negative 1 wave heads down and to the left. But it still has one oscillation across the box in x, and one oscillation across the box in y. But now as the x's and y's are both non-negative, we see the crests of the wave are headed in a different direction. Let's look at something a little bit more complicated. Let's look at a 2, minus 3 wave. >> Now we have two oscillations in x, three oscillations across the box in y, and the crests are headed down towards the lower right corner of the box, because we used a negative k value. Now if we had used a negative value of h instead, for instance if we used a negative 2 1, we see we also have a wave, whose crest head towards the lower right box. And, if we had had both, both h and k negative, for instance, minus 2 minus 3, amp 1 and 0. Now we have a wave that looks very much like the 2, 3 wave, the positive 2, positive 3 wave. In fact there's two oscillations across the box in x, three oscillations across the box in y, and the crests are headed towards the upper right corner. In other words, this is indistinguishable from the h equals 2, k equals 3 wave. So a negative 2, negative 3 wave is indistinguishable from a positive 2, positive 3 wave. For the same reason that sine waves, you can't tell whether they're traveling forward or backwards. They look the same in either direction. So when we were looking at one-dimensional Fourier transforms, I showed you on the plots that when the computer responds with, what is the Fourier transform of a function, it would show a wave with a positive spatial frequency and also a negative spatial frequency. And that's because the two are indistinguishable. So by convention, we usually only talk about positive h values. But both positive and negative k values, which are all the unique waves that we need to deal with to understand 2D images. Now let's look at what would happen if we start to add together many waves of many different spatial frequencies, amplitudes and phases. So let's begin with an h equals 2, k equals 5 wave, amplitude 1 and a phase of 90 degrees. So it's a complicated pattern. Now let's add another wave of say, a 2 minus 3 wave, with an amplitude of 3, and a phase of 270 degrees. Now we start to get a more complicated image. And to that, we could add an additional wave. Let's say h equals 8, k equals 3, and to this wave, we'll give it a, a more, a, a larger amplitude 6 and a phase of 0. And we have more complexities. Let's add an h equals 10 and k equals minus 7 also, with a significant amplitude and a phase, we get an even more complicated pattern. To this, let's add an h equal 20, k equals minus 15 again, with a comparable amplitude and phase. And we add yet another wave. Let's say 3 3 and 10, and a 0. So what you can see is that we can build up a complicated image by adding together many two-dimensional sine waves. And in fact, any image at all can be decomposed into its component sine waves. And this is a two-dimensional Fourier transform, to decompose an image into its component sine waves. And we know which since waves it contains. They are the sine waves with integral number of wavelengths across the box in x and y. Each sine wave would be characterized by Miller indices, h and k. These are integer values. Each one would have a specific amplitude and a specific phase. And if we added up all those component, two-dimensional sine waves, we would recover the original image.