Double integral in cartesian coordinate instead of (R,Theta)

限于喜欢 提交于 2019-12-04 10:02:12
DrV

Actually, the integration in Cartesian coordinates is rather straightforward. Now that you have the intensity function, you have to express the radius r by coordinates x and y. A trivial thing which you have actually done in your question.

So, the function to be integrated (without some constants) is:

from scipy import special as sp

# Fraunhofer intensity function (spherical aperture)
def f(x,y):
    r = np.sqrt(x**2 + y**2)
    return (sp.j1(r)/r)**2

Or by using the fact that 2 J1(x)/x = J0(x) + J2(x) [thanks, Jaime!]:

def f(x,y):
    r = np.sqrt(x**2 + y**2)
    return (sp.j0(r) + sp.jn(2,r))**2

This form is better in the sense that it does not have a singularity anywhere.

Now, I do not use any constant factors. You may add them if you want, but I find it easier to normalize with the integration result over infinite area. Otherwise it is too easy to just forget some constant (I do, usually).

The integration can be carried out with scipy.integrate.nquad. It accepts a multi-dimensional function to integrate. So, in this case:

import scipy.integrate

integral = scipy.integrate.nquad(f, ([-d/2, d/2], [-d/2, d/2]))[0]

However, as your function is very clearly symmetric, you might consider integrating over one quadrant only and then multiply by four:

4. * scipy.integrate.nquad(f, ([0, d/2], [0, d/2]))[0]

By using these the full intensity is:

>>> 4. * scipy.integrate.nquad(f, [[0,inf],[0,inf]])[0]
12.565472446489999

(Which looks very much like 4 pi, BTW.) Of course, you can also use the polar coordinates to calculate the full value, as the function has circular symmetry (as outlined in Integral of Intensity function in python). The different values are due to different scaling (2 pi omitted in the polar integration, 2 because I am using the sum form of the bessel functions here).

For example for a square area from -1..1 on both directions the normalized (divided by the above full power value) power over the square area is:

>>> 4*scipy.integrate.nquad(f, [[0,1],[0,1]])[0] / 12.565472446489999
0.27011854108867

So, approximately 27 % of the incoming light shines onto the square photodetector.


When it comes to your constants, it seems that something (at least units) is missing. My guess:

  • wavelength: 550 nm
  • circular aperture diameter: 0.0055" = 0.14 mm
  • distance from the aperture to the sensor: 2.8 mm
  • square sensor size 5.4 um x 5.4 um

The last one I just guessed from the image. As the sensor size is very much smaller than the distance, sin(ϴ) is very close to y/d, where d is distance and y displacement from the optical axis. By using these numbers x = ka sin(ϴ) = kay / d ≈ 1.54. For that number the intensity integral gives approximately 0.52 (or 52 %).

If you are comparing this to some experimental value, remember that there are numerous error sources. The image on the image plane is a fourier transform of the aperture. If there are small imperfections in the aperture edge, they may change the resulting spot. Airy rings are seldom as beautiful as astronomers think...

Just for fun:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!