# Modeling the diffraction of arbitrary electric fields by diffraction gratings

I have read from many sources that the Fraunhoffer diffraction pattern is the Fourier transform of the grating. But I feel like these explanations do not take into account the curvature of the initial beam.

Let's say my grating is defined by $G(x)$. I have a beam $E(x)$ incident on the grating and want to know what my image looks like in the far-field.

The normal technique for modeling diffraction seems to be to just take a fourier transform: $\mathscr{F} (G(x))$. How do I interpret this in spatial variables? I can see that the answer makes sense in the Fourier domain, but how can I map this again onto the spatial domain without taking a trivial $\mathscr{F}^{-1}$ back to my original function?

Also what if my initial beam has some arbitrary curvature. This method does not utilize any information about the input beam. I've thought of the following variations: $$\mathscr{F}^{-1} \left[ \mathscr{F}\left[G(x)\right]\times \mathscr{F}\left[E(x)\right] \right]$$ and $$\mathscr{F}^{-1} \left[ \mathscr{F}\left[G(x) \times E(x)\right] \right]$$

I am having some numerical issues in visualizing the results so I can't confirm my answers. I'd appreciate any explanation of whether these variations are sensible or suggestions of what books might be useful. I've browsed through Goodman and a couple of other derivations of diffraction patterns but found nothing that seems to talk about arbitrary initial beams.

The Kirchoff diffraction formula for an extended source in the Fraunhofer regime (i.e., Fresnel number $F=a^{2}/(\lambda z)\ll 1$) looks like this:

$$U(p)\propto \int_{S}a_{0}(x,y,z=0)e^{ik\left[lx + my\right]}dxdy\hspace{1cm}(1)$$

$U(p)$ is the field seen at point $p$ on the screen after the initial field $a_{0}(x,y,z=0)$ is diffracted from an object at $z=0$. $l$ and $m$ are direction cosines in $x$ and $y$, respectively. $a(x,y,z=0)$ is given by the transfer function of the diffracting object $G(x,y)$ multiplied by the illuminating field $E(x,y,z=0)$. Using this, we see that:

$$\hspace{1cm}U(p)\propto \int_{S}E(x,y,z=0)G(x,y)e^{ik\left[lx + my\right]}dxdy\hspace{1cm}(2)$$

so you now see the diffraction pattern depends on the properties of the illuminating field. Using your notation and equation 2, a Fraunhofer diffraction pattern can be modelled using:

$$\hspace{1cm}U(k_{x}, k_{y}, z) = \mathscr{F}\left[ E(x,y,z=0)\times G(x,y) \right]\hspace{1cm}(3)$$

This will give the diffraction pattern in phase space, as you mention. To transform from phase space to $x$ and $y$ at the screen, you can use:

$$\hspace{1cm}P_{\text{screen}} = \frac{\lambda}{\sin\left( \arctan(NP_{\text{object}}/z) \right)}\hspace{1cm}(4)$$

$P_{\text{screen}}$ is the pixel size projected to the screen, $N$ is the number of pixels for both the screen and object planes, and $P_{\text{object}}$ is the pixel size in the object plane.

To show that it works, here are some calculated single-slit diffraction patterns. All use a slit width $\delta=250$ $\mu$m and assume a Gaussian beam with a focus at the slit as the illuminating field (focal spot size $w_{0}$). The distance between the object and the screen was 1m. These parameters give Fresnel numbers of 0.0078 and 0.0039, confirming Fraunhofer diffraction. The top and central images use $\lambda=500$ nm, but different focal spot sizes, and the bottom image uses $\lambda=1$ $\mu$m with the same spot size used for the top image. The colour map is log$_{10}$ scaled.

The Gaussian beam propagation has a clear effect on the diffraction pattern at the screen. For a single slit diffraction pattern, the analytic formula for the position first diffraction minima about the central peak is:

$$x = \frac{\pm 1\lambda z}{\delta}\hspace{1cm}(5)$$

and this gives the $m=\pm 1$ minima at approximately 2 mm for the 500 nm light, and at roughly 4 mm for the 1 $\mu$m light, very close to the calculated minima above.

I chose a single-slit diffraction pattern and Gaussian beam propagation here because they're relatively simple and there are analytic formulae available to test the model. However, you could choose arbitrary amplitude and phase masks for the diffraction, as well as any field definition you like and it should still work well as long as you are in the Fraunhofer regime ($F\ll 1$).

You are correct that many treatments of the problem ignore the variation of the beam's field along the grating and just assume it's a plane wave with a flat phase. However, this is relatively easy to fix: if you start off with some (complex-valued) field $E(x)$ impinging on a diffraction grating $G(x)$, then the far-field amplitude will be the Fourier transform of the electric field just after the grating, i.e. $G(x)$. The key tool to calculate this is the convolution theorem, which reads $$\mathscr F[E(x)\cdot G(x)] = \mathscr F[E(x)] \ast \mathscr F[G(x)],$$ i.e., the Fourier transform of the product of the field and the grating is given by the convolution between the Fourier transform of the grating (i.e. the usual action of the grating with a plane-wave incident field) and the Fourier transform of the near field (i.e. the far field if there were no grating present).

Once you have that search term, there are plenty of interesting references that include the field's variation at the grating.