# 1D discrete fourier transform

1. Sep 18, 2016

### Jezza

1. The problem statement, all variables and given/known data

This is a computing coursework problem. (There is a reasonably long theory preamble).

Create a single slit centred on the origin (the centre of your array) width 10 and height 1. The array containing the imaginary parts will be zero and the array containing the real parts will be 1 for the 10 elements at either side of the centre of the array and zero otherwise. (This constitutes the function f(x) in DFT equation shown below.)

Calculate the DFT of this single slit function and plot the real part and the amplitude of the transform.

2. Relevant equations

The (1D) Fourier transform can be approximated as a sum over discrete values

$$F(u) = \frac{1}{2N} \sum_{x=-N}^{N-1} \left( f(x) e ^ {-\frac{\pi i x u}{N}} \right)$$

Where $i$ is the imaginary unit.

3. The attempt at a solution

Where does the 'height' of the slit come into a 1D problem? I would write it off as ignorable information, but for the fact that I'm later asked to halve the height of the slit and repeat the calculation. The only thing I can think of is to halve the intensity of the source, but I can't help feeling the consequences of that are trivial and so not worth the trouble.

2. Sep 18, 2016

### Dr Transport

how would you set up a triangle function for the transmission of the slit

3. Sep 18, 2016

### Jezza

I'm afraid I don't understand your question. The suggested representation of the slit's transmission is as a square function.

4. Sep 18, 2016

### Jezza

I feel I might not have explained the question very well. The array represents a discrete real space where the element is the value of $f(x_j)$. $x_j = j\delta$ where $\delta$ is an arbitrary grid spacing and $j$ is the index of the element.

5. Sep 18, 2016

### Dr Transport

what if the transmission function was a phase function, how would you represent that

6. Sep 18, 2016

### Jezza

I'm not quite sure what a phase function is, but assuming this is the kind of phase function you're talking about https://en.wiktionary.org/wiki/phase_function, I would map $\theta$ to array index in the same way the question leads me to map $x$ to array index.

7. Sep 18, 2016

### Jezza

So to answer your previous question, I suppose I would have the centre of my array looking something like:

{0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 0.8, 0.6, 0.4, 0.2, 0.0}

8. Sep 18, 2016

### Dr Transport

So, now you know how to adjust the amplitude transmitted by the slit. Sure, it is trivial, but the question posed now allows you to put a hole host of transmission functions into the DFT.