SpinWaveToolkit.bls.ObjectiveLens#

class SpinWaveToolkit.bls.ObjectiveLens(wavelength, NA, f0, f)#

Represents an objective lens with specific optical parameters.

Module for calculating the electric field focused by an objective lens. Calculations follow the method presented in book of Novotny and Hecht.

Parameters:
wavelengthfloat

(m ) wavelength of the light.

NAfloat

Numerical aperture of the objective lens.

f0float

Filling factor.

ffloat

(m ) focal length of the objective lens.

Attributes:
same as Parameters

Methods

getFocalFieldRad(z, rho_max, N)

Compute the focal field using a radial formulation.

getFocalFieldAzm(z, rho_max, N)

Compute the focal field using an azimuthal formulation (E_z = 0).

getFocalField(z, rho_max, N)

Compute the focal field using a general formulation.

getPupilField(z, KX, KY[, ...])

Computes the complex electric field distribution in reciprocal space.

See also

get_signal_GF_focal, get_signal_RT_focal, get_signal_RT_pupil

Functions that use the electric fields for BLS signal calculations.

SpinWaveToolkit.rotate_field

Function for rotating the vectorial electric field in xy plane.

getFocalField(z, rho_max, N)#

Compute the focal field using a general formulation.

The field incident onto the objective is assumed to be linearly polarized along the x axis.

Parameters:
zfloat

(m ) defocus of the beam (z = 0 corresponds to the focal plane).

rho_maxfloat

(m ) maximum radial coordinate for evaluation.

Nint

Number of points in each direction for the output grid.

Returns:
xi, yindarray

Vectors (1D numpy arrays) defining the interpolation grid.

Exi, Eyi, Ezindarray

Complex electric field components on the grid. Specified as 2D arrays.

getFocalFieldAzm(z, rho_max, N)#

Compute the focal field using an azimuthal formulation (E_z = 0).

The field incident onto the objective is assumed to be azimuthally polarized.

Parameters:
zfloat

(m ) defocus of the beam (z = 0 corresponds to the focal plane).

rho_maxfloat

(m ) maximum radial coordinate for evaluation.

Nint

Number of points in each direction for the output grid.

Returns:
xi, yi1D numpy arrays

Vectors defining the interpolation grid.

Exi, Eyi, Ezindarray

Complex electric field components on the grid (with E_z identically zero). Specified as 2D arrays.

getFocalFieldRad(z, rho_max, N)#

Compute the focal field using a radial formulation.

The field incident onto the objective is assumed to be radially polarized.

Parameters:
zfloat

(m ) defocus of the beam (z = 0 corresponds to the focal plane).

rho_maxfloat

(m ) maximum radial coordinate for evaluation.

Nint

Number of points in each direction for the output grid.

Returns:
xi, yi1D numpy arrays

Vectors defining the interpolation grid.

Exi, Eyi, Ezindarray

Complex electric field components on the grid. Specified as 2D arrays.

getPupilField(z, KX, KY, polarization_type='linear', polarization_angle_deg=0)#

Computes the complex electric field distribution in reciprocal space.

This represents the field near the focus of a high-NA objective lens—including amplitude apodization, polarization transformation, and defocus phase, projected onto the kx-ky plane. This is the integrand for the vectorial Debye diffraction integral.

Parameters:
zfloat

(m ) defocus distance along optical axis.

KXndarray

(rad/m) 2D reciprocal-space grid (kx).

KYndarray

(rad/m) 2D reciprocal-space grid (ky).

polarization_typestr, optional
“linear” - linearly polarized (angle set by
polarization_angle_deg)
“radial” - radial polarization
“azimuthal” - azimuthal polarization
“rcp” - right-hand circular polarization
“lcp” - left-hand circular polarization
polarization_angle_degfloat, optional

(deg) linear polarization angle. Default is 0. Ignored when polarization_type is other than “linear”.

Returns:
Ex_k, Ey_k, Ez_kndarray

Complex electric field components in k-space (2D arrays).