1. Characteristics

Vector_paraxial_XY is a set of three modules for:

  • Generation of 2D (xy-axis) paraxial vector light source.
  • Generation of 2D (xy-axis) paraxial vector masks and diffractive optical elements.
  • Propagation of light, determination of parameters, and other functions.
  • Drawing sources, masks and fields.

These modules are named: vector_paraxial_fields_XY.py, vector_paraxial_sources_XY.py, and vector_paraxial_masks_XY.py.

Each module present a main class:

  • Vector_paraxial_field_XY
  • Vector_paraxial_mask_XY
  • Vector_paraxial_source_XY

The main attributes for these classes are the following:

  • self.x (numpy.array): linear array with equidistant positions. The number of data is preferibly \(2^n\).
  • self.y (numpy.array): linear array with equidistant positions. The number of data is preferibly \(2^n\).
  • self.wavelength (float): wavelength of the incident field.
  • (numpy.array): complex field with size 2D x.y
    • self.Ex
    • self.Ey
    • self.Ez

We can also find these atributes:

  • self.X (numpy.array): equal size to x * y. complex field.
  • self.Y (numpy.array): equal size to x * y. complex field.
  • self.quality (float): quality of RS propagation. Valid for values > 1.
  • self.info (str): description of data.
  • self.type (str): Class of the field.
  • self.date (str): date when performed.

The propagation techiniques implemented are:

  • RS - Rayleigh-Sommerfeld propagation for Ex and Ey fields
  • VRS - Complete vector propagation (Ex, Ey, Ez) in Rayleigh-Sommerfeld approach.

The dimensional magnitudes are related to microns: micron = 1.

1.1. Generation of light sources

An instance must be created before starting to operate with light sources. The initialization accepts several arguments.

1.2. Creating an instance

[1]:
from diffractio import degrees,  mm,  nm, np, plt, sp, um

from diffractio.scalar_sources_XY import Scalar_source_XY
from diffractio.scalar_masks_XY import Scalar_mask_XY
from diffractio.scalar_fields_XY import Scalar_field_XY

from diffractio.vector_paraxial_sources_XY import Vector_paraxial_source_XY
from diffractio.vector_paraxial_masks_XY import Vector_paraxial_mask_XY
from diffractio.vector_paraxial_fields_XY import Vector_paraxial_field_XY
number of processors: 8
total memory        : 15.5 Gb
available memory    : 35 %
max frequency       : 3100 GHz
[2]:
from matplotlib import rcParams
rcParams['figure.figsize']=[8,6]
rcParams['figure.dpi']=125

1.3. Generating a vectorial light source

Light sources are defined in the scalar_sources_xy.py module. When the field is initialized, the amplitude of the field is zero. Vector sources are generated using a scalar source and providing a vector polarization. There are many methods to convert a scalar source to a vector source:

  • constant_wave: Generates a plane wave with a given direction and amplitude.
  • radial_wave: Generates a plane wave with radial polarization.
  • azimuthal_wave: Generates a plane wave with transversa polarization.
  • radial_inverse_wave:
  • local_polarized_vector_wave: Local radial polarized vector wave.
  • local_polarized_vector_wave_radial: Local radial polarized vector wave.
  • local_polarized_vector_wave_hybrid: Local hibrid polarized vector wave.
  • spiral_polarized_beam: Spiral polarized wave.

For a more detailed description of each method, refer to the individual documentation of each one.

Example: gauss azimuthal_wave

[3]:
x0 = np.linspace(-125 * um, 125 * um, 512)
y0 = np.linspace(-125 * um, 125 * um, 512)

wavelength = 0.6328 * um

Scalar source

[4]:
u0 = Scalar_source_XY(x0, y0, wavelength)
u0.gauss_beam(
    r0=(0, 0),
    w0=(100 * um, 100 * um),
    z0=0 * um,
    A=1,
    theta=0. * degrees,
    phi=0 * degrees)

Vector source

[5]:
EM1 = Vector_paraxial_source_XY(x0, y0, wavelength)
EM1.radial_wave(u=u0, r0=(0,0), radius=(200,200))

If we need, we can convert the \(E_x\) and \(E_y\) fields in Scalar_field_XY.

[6]:
Ex,Ey,_=EM1.get()
print(Ex)
Scalar_field_XY
 - x:  (512,),   y:  (512,),   u:  (512, 512)
 - xmin:       -125.00 um,  xmax:      125.00 um
 - ymin:       -125.00 um,  ymax:      125.00 um
 - Imin:       0.00,     Imax:      0.99
 - phase_min:  -180.00 deg, phase_max: 0.00 deg
 - wavelength: 0.63 um
 - date:       2021-05-16_03_55_42
 - info:

We can obtain a variety of representation, simply using the draw method.

[7]:
EM1.draw(kind='ellipses')
../../../_images/source_tutorial_vector_paraxial_XY_tutorial_vector_XY_14_0.png

Polarimetric representation can be performed in a simple way.

[8]:
EM1.draw('stokes');
../../../_images/source_tutorial_vector_paraxial_XY_tutorial_vector_XY_16_0.png

2. A vector light source passes through a linear polarizer

[9]:
M1=Vector_paraxial_mask_XY(x=x0, y=y0, wavelength=wavelength)
M1.polarizer_linear(azimuth=45*degrees)
M1.draw()
<Figure size 1000x750 with 0 Axes>
../../../_images/source_tutorial_vector_paraxial_XY_tutorial_vector_XY_18_1.png

2.1. Multiplying fields by mask

We can have complex vector mask using the functions based on Scalar_XY masks. Also, vector masks are provided which act as simple polarizers.

[10]:
EM2=EM1*M1
[11]:
EM2
EM2.draw('stokes');
../../../_images/source_tutorial_vector_paraxial_XY_tutorial_vector_XY_21_0.png

As the polarizer is linear at 45º, only \(S_2\) parameter is obtained.

2.2. Propagation

Vector fields can be propagated using Rayleigh-Sommerfeld approach.

[12]:
EM3=EM2.RS(z=2*mm, new_field=True)
[13]:
EM3.draw('ellipses')
../../../_images/source_tutorial_vector_paraxial_XY_tutorial_vector_XY_25_0.png

Light is propagated, but as the polarization is the same for all the positions, the result is the same as an scalar propagation.

3. Propagation of an spiral polarized beam

[14]:
x0 = np.linspace(-125 * um, 125 * um, 512)
y0 = np.linspace(-125 * um, 125 * um, 512)

wavelength = 0.6328 * um
[15]:
u0 = Scalar_source_XY(x0, y0, wavelength)
u0.gauss_beam(
    r0=(0, 0),
    w0=(75 * um, 75 * um),
    z0=0 * um,
    A=1,
    theta=0. * degrees,
    phi=0 * degrees)
[16]:
EM0 = Vector_paraxial_source_XY(x0, y0, wavelength)
EM0.spiral_polarized_beam(u0, r0=(0,0), alpha=45*degrees)
[17]:
EM0.draw('ellipses', num_ellipses=(21, 21), amplification=0.5)
../../../_images/source_tutorial_vector_paraxial_XY_tutorial_vector_XY_31_0.png
[18]:
EM1=EM0.RS(z=5*mm, verbose=True)
Good result: factor 24.69
[19]:
EM1.draw('ellipses', num_ellipses=(21, 21), amplification=0.75)
../../../_images/source_tutorial_vector_paraxial_XY_tutorial_vector_XY_33_0.png

4. Vector Rayleigh-Sommerfeld Approximation

We have implemented the Vector Rayleigh-Sommerfeld approach to propagation of vectorial fields as used in H. Ye, C.-W. Qiu, K. Huang, J. Teng, B. Luk’yanchuk, y S. P. Yeo, «Creation of a longitudinally polarized subwavelength hotspot with an ultra-thin planar lens: vectorial Rayleigh–Sommerfeld method», Laser Phys. Lett., vol. 10, n.º 6, p. 065004, jun. 2013. DOI: 10.1088/1612-2011/10/6/065004 (http://stacks.iop.org/1612-202X/10/i=6/a=065004?key=crossref.890761f053b56d7a9eeb8fc6da4d9b4e). In the propagation, there is a transference of field from the Ex, Ey polarizations to Ez polarization.

[20]:
from diffractio import np, sp, plt, nm, um, mm, degrees

from diffractio.vector_paraxial_sources_XY import Vector_paraxial_source_XY
from diffractio.scalar_masks_XY import Scalar_mask_XY
from diffractio.scalar_fields_XY import Scalar_field_XY
from diffractio.scalar_sources_XY import Scalar_source_XY

from diffractio.vector_paraxial_fields_XY import Vector_paraxial_field_XY
[21]:
size=25*um
x0=np.linspace(-size,size,256)
y0=np.linspace(-size,size,256)
wavelength=.640*um

[22]:
focal=25*um

t=Scalar_mask_XY(x0,y0,wavelength)
t.lens(r0=(0,0), focal=focal, radius=size)
[23]:
E0 = Vector_paraxial_source_XY(x0,y0,wavelength)
E0.radial_wave(u=t)
[24]:
E1=E0.VRS(z=focal, n=1, new_field=True, verbose=False, amplification=(1,1))
E1.cut_resample(x_limits=(-4,4), y_limits=(-4,4))
E1.draw(kind='intensities', logarithm=0.5);
../../../_images/source_tutorial_vector_paraxial_XY_tutorial_vector_XY_39_0.png

Also, amplification can be performed on this fields.

[25]:
E1=E0.VRS(z=focal+50*um, n=1, new_field=True, verbose=False, amplification=(3,3))
E1.draw(kind='intensities', logarithm=False);
../../../_images/source_tutorial_vector_paraxial_XY_tutorial_vector_XY_41_0.png

Additionally, r-z fields can be drawn for vector fields:

[26]:
E1=E0.VRS(z=focal, n=1, new_field=True, verbose=False, amplification=(1,1))
E1.cut_resample((-5,5),(-5,5))
E1.draw(kind='intensities_rz', logarithm=False);
../../../_images/source_tutorial_vector_paraxial_XY_tutorial_vector_XY_43_0.png
[ ]: