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

my previous question ( Intensity Function Integral in python )

You can see the diffraction model in the image below:

enter image description here

I want to calculate the intensity integral in each pixel (square), so I cannot use R and Theta as variables. How to do it in XY coordinate.

Our function:

fn

instead of sin (theta) we can use:

sintheta= (np.sqrt((x)**2 + (y)**2)/(np.sqrt((x)**2 + (y)**2 + d**2)))

Other constants:

lamb=550*10**(-9)
k=2.0*np.pi/lamb
a=5.5*2.54*10**(-2)
d=2.8

when you create a function, the result looks something like this: (The top view is a top view)

enter image description here

: (0.0, dist) * (2 * np.pix), x = ka * np.sin(theta). . , X-Y, .

+4
1

. , , r x y. , .

, , ( ), :

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

, 2 J1 (x)/x = J0 (x) + J2 (x) [, Jaime!]:

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

, .

. , , . (, ).

scipy.integrate.nquad. . , :

import scipy.integrate

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

, , , :

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

, :

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

( 4 pi, BTW.) , , ( Intensity python). (2 pi , 2, ).

, -1.1 ( ) :

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

, 27% .


, , - ( , ) . :

  • : 550
  • : 0,0055 "= 0,14
  • : 2,8
  • 5,4 x 5,4

, . , sin (Θ) y/d, d - y . x = ka sin (Θ) = kay/d ≈ 1.54. 0,52 ( 52%).

, , . . , . , ...

:

enter image description here

+4

Source: https://habr.com/ru/post/1546436/


All Articles