7.1. Focusing a Gauss beam

[1]:
from diffractio import degrees, mm, plt, sp, um, np
from diffractio.scalar_masks_X import Scalar_mask_X
from diffractio.scalar_masks_XZ import Scalar_mask_XZ
from diffractio.scalar_sources_X import Scalar_source_X

7.1.1. Propagation of a Gauss beam

When we define the Gauss beam, we define the position of the beam waist, z0, and the the width at focus, w0. In ths case, z0 is the distance from the initial plane:

[2]:
x0 = np.linspace(-150 * um, 150 * um, 1024)
z0 = np.linspace(-100 * um, 100 * um, 1024)

wavelength = 7.5 * um
u0 = Scalar_source_X(x=x0, wavelength=wavelength)
u0.gauss_beam(A=1, x0=0 * um, z0=100 * um, w0=5 * um, theta=0 * degrees)

7.1.2. Vacuum

[3]:
u0.draw()
../../_images/source_examples_gauss_beam_5_0.png
[4]:
x0 = np.linspace(-200 * um, 200 * um, 512)
z0 = np.linspace(-100 * um, 100 * um, 512)

wavelength = 10 * um
u0 = Scalar_source_X(x=x0, wavelength=wavelength)
u0.gauss_beam(A=1, x0=0 * um, z0=100 * um, w0=10 * um, theta=0 * degrees)

[5]:
u1 = Scalar_mask_XZ(x=x0, z=z0, wavelength=wavelength, n_background=1)
u1.incident_field(u0)

As we can see, the shape at the incident beam, has not w0=5 um.

[6]:
u1.WPM(verbose=True)
u1.cut_resample(x_limits=(-50, 50), num_points=(512, 512))

Time = 0.37 s, time/loop = 0.7144 ms

Let us see the propagation

[7]:
u1.draw(kind='phase', scale='scaled')
u1.draw(kind='intensity', logarithm=1, scale='scaled')

../../_images/source_examples_gauss_beam_11_0.png
../../_images/source_examples_gauss_beam_11_1.png

7.1.3. Layer

When the Gauss beam reaches a layer of dielectric, the wavefront and the beam profile changes

[8]:
u1 = Scalar_mask_XZ(x=x0, z=z0, wavelength=wavelength, n_background=1)
u1.incident_field(u0)
u1.semi_plane(r0=(0, -50), refractive_index=2, angle=0 * degrees)
u1.draw_refractive_index()
../../_images/source_examples_gauss_beam_13_0.png
[9]:
u1.WPM(verbose=True)
u1.cut_resample(x_limits=(-50, 50), num_points=(512, 512))

Time = 0.30 s, time/loop = 0.5782 ms
[10]:
u1.draw(kind='phase', scale='scaled', draw_borders=True)
u1.draw(kind='intensity', logarithm=1, scale='scaled', draw_borders=True)

../../_images/source_examples_gauss_beam_15_0.png
../../_images/source_examples_gauss_beam_15_1.png

As can be seen, the beam waist is not at the same position.