6
$\begingroup$

I want to calculate the 2D Fourier transformation of a circular shaped aperture, but Mathematica won't finish the calculation:

h[x_, y_] := UnitBox[Sqrt[x^2 + y^2]]
Plot3D[FourierTransform[h[x, y], {x, y}, {k1, k2}], {k1, -5, 5}, {k2, -5, 5}]

So I tried to use the numerical NFourierTransform, but it showed me just an empty plot.

Needs["FourierSeries`"]
Plot3D[NFourierTransform[h[x, y], {x, y}, {k1, k2}], 
  {k1, -3, 3}, {k2, -3, 3}, 
  PlotRange -> All]

Does somebody know how I can calculate the Fourier transform of a circular aperture in a reasonable amount of time?

$\endgroup$
  • $\begingroup$ what is the definition of h[] ? $\endgroup$ – image_doctor Aug 25 '15 at 13:57
  • 1
    $\begingroup$ Sorry, I tried different versions of the UnitBox and forgot to change the function. I edited my Question. $\endgroup$ – lIlIIIllIIIllII Aug 25 '15 at 13:59
  • $\begingroup$ Presumably there are some imaginary numbers in the result which is why you get an empty image. Either take Abs of the Fourier transform, or look at the real and imaginary parts separately. You could also create an image of the aperture ap=Table[h[i,j],{i,-5,5,10/99},{j,-5,5,10/99}] and do the discrete transform ArrayPlot[Abs@Fourier@ap] or something. $\endgroup$ – N.J.Evans Aug 25 '15 at 14:23
  • $\begingroup$ The reason why NFourierTransform gives you an empty box is that it can only handle one-dimensional integrals. For a more robust numerical approach, you may want to look at 2D Fourier transform of a few (4) disjoint discs on a plane $\endgroup$ – Jens Aug 25 '15 at 23:34
6
$\begingroup$

To get the correct result for the 2D Fourier transform of a function which doesn't factor in Cartesian coordinates, it's usually necessary to give Mathematica some assistance as to the best choice of coordinates.

In the circular case, that of course means we should use polar coordinates:

Clear[k];
airy[k_] = 
 1/(2 Pi)
   Integrate[
   r Exp[I k r Cos[ϕ]], {r, 0, 1}, {ϕ, -Pi, Pi}]

(* ==> BesselJ[1, k]/k *)

Plot[airy[k], {k, -40, 40}, PlotRange -> All]

airy

This is the famous Airy diffraction pattern of a circular aperture (when squared to get the intensity).

In setting up the integral for the Fourier transform, I used the fact that the expected result will depend only on the magnitude and not on the direction of the wave vector, so that you can choose the direction of $\vec{k}$ as the x axis for the polar integral.

$\endgroup$
  • $\begingroup$ +1 I deleted my answer.You're right, of course (I forgot the Jacobian) $\endgroup$ – Dr. belisarius Aug 26 '15 at 2:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.