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
number of processors: 8
total memory        : 15.5 Gb
available memory    : 48 %
max frequency       : 3100 GHz
battery             : 100 %
[2]:
from matplotlib import rcParams
rcParams['figure.dpi']=125

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:

[3]:
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)

1.2. Vacuum

[4]:
u0.draw()
../../../_images/source_examples_optics_gauss_beam_6_0.png
[5]:
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)
[6]:
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.

[7]:
u1.WPM(verbose=True)
u1.cut_resample(x_limits=(-50,50),num_points=(512,512))
Time = 0.35 s, time/loop = 0.6916 ms

Let us see the propagation

[8]:
u1.draw(kind='phase', scale='scaled')
u1.draw(kind='intensity', logarithm=1, scale='scaled');
../../../_images/source_examples_optics_gauss_beam_12_0.png
../../../_images/source_examples_optics_gauss_beam_12_1.png

1.3. Layer

When a layer of

[15]:
u1 = Scalar_mask_XZ(x=x0, z=z0, wavelength=wavelength, n_background=1)
u1.incident_field(u0)
u1.semi_plane(r0=(0, -50), refraction_index=1.5, angle=0 * degrees)
u1.draw_refraction_index()
[15]:
<matplotlib.image.AxesImage at 0x7fc899ff4190>
../../../_images/source_examples_optics_gauss_beam_14_1.png
[16]:
u1.WPM(verbose=True)
u1.cut_resample(x_limits=(-50,50),num_points=(512,512))
Time = 0.34 s, time/loop = 0.6731 ms
[17]:
u1.draw(kind='phase', scale='scaled',draw_borders=True)
u1.draw(kind='intensity', logarithm=1, scale='scaled',draw_borders=True);
../../../_images/source_examples_optics_gauss_beam_16_0.png
../../../_images/source_examples_optics_gauss_beam_16_1.png

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