Heterogeneous calculation of interference in XY field?

Issue #21 new
Former user created an issue

The two examples below show interference of two inclined Gaussian beams. In the first example, the modified angle is phi, in the second theta.

I expect the same interference pattern but just rotated 90 deg. What I get is strange. It seems that interference i snot calculated in one direction. Am i missing something?

# first case
from diffractio import degrees, mm, np, plt, um
from diffractio.scalar_sources_XY import Scalar_source_XY

obj_plane = 100 * um
x0 = np.linspace(-obj_plane/2, obj_plane/2, 512)
y0 = np.linspace(-obj_plane/2, obj_plane/2, 512)
z0 = np.linspace(-obj_plane/2, obj_plane/2, 512)

wavelength0 = 0.6238 * um

uxy1 = Scalar_source_XY(x=x0, y=y0, wavelength=wavelength0)

uxy1.gauss_beam(
    A=1,
    r0=(0 * um, 0 * um),
    z0=0,
    w0=(50 * um, 50 * um),
    phi=0 * degrees,
    theta=0 * degrees)

uxy2 = Scalar_source_XY(x=x0, y=y0, wavelength=wavelength0)

uxy2.gauss_beam(
    A=1,
    r0=(0 * um, 0 * um),
    z0=0,
    w0=(50 * um, 50 * um),
    phi=0 * degrees,
    theta=10 * degrees)

uxy = uxy1 + uxy2

# draw 
uxy.RS(z=1 *um)
uxy.draw(logarithm=True, scale='scaled', verbose=True)
#second case
from diffractio import degrees, mm, np, plt, um
from diffractio.scalar_sources_XY import Scalar_source_XY

obj_plane = 100 * um
x0 = np.linspace(-obj_plane/2, obj_plane/2, 512)
y0 = np.linspace(-obj_plane/2, obj_plane/2, 512)
z0 = np.linspace(-obj_plane/2, obj_plane/2, 512)

wavelength0 = 0.6238 * um

uxy1 = Scalar_source_XY(x=x0, y=y0, wavelength=wavelength0)

uxy1.gauss_beam(
    A=1,
    r0=(0 * um, 0 * um),
    z0=0,
    w0=(50 * um, 50 * um),
    phi=0 * degrees,
    theta=0 * degrees)

uxy2 = Scalar_source_XY(x=x0, y=y0, wavelength=wavelength0)

uxy2.gauss_beam(
    A=1,
    r0=(0 * um, 0 * um),
    z0=0,
    w0=(50 * um, 50 * um),
    phi=10 * degrees,
    theta=0 * degrees)

uxy = uxy1 + uxy2

# draw 
uxy.RS(z=1 *um)
uxy.draw(logarithm=True, scale='scaled', verbose=True)

Comments (0)

  1. Log in to comment