Functions#
- SpinWaveToolkit.bls.fresnel_coefficients(lambda_, DF, PM, d, source_layer_index, output_layer_index)#
Compute Fresnel coefficients for p- and s-polarized waves as a function of lateral wavevector q.
- Parameters:
- lambda_
float (m ) wavelength of the calculated light.
- DFarray_like
() array of dielectric functions (complex) for each layer, ordered from top (superstrate) downward.
- PMarray_like
() array of relative permeabilities for each layer (typically ones).
- darray_like
(m ) array of thicknesses for the layers between the superstrate and substrate. Length should be
len(DF) - 2.- source_layer_index
int 0-indexed index of the layer where the source (induced polarization) is located.
- output_layer_index
int 0-indexed index of the layer where the output is desired.
- lambda_
- Returns:
- htp
function A function that computes the p-polarized Fresnel transmission coefficients for given q.
- hts
function A function that computes the s-polarized Fresnel transmission coefficients for given q.
- htp
Notes
The returned functions htp and hts take single argument q, which can be a float or ndarray in units rad/m. The shape of their output depends on the shape of q and the chosen output_layer_index:
if 0 or N-1 (top or bottom layer), output shape is
(2, ...)where...is the shape of q,elsewhere (any interior layer), output shape is
(2, 2, ...).
- SpinWaveToolkit.bls.sph_green_function(Kx, Ky, DFMagLayer, wavelength, tp, ts)#
Compute the spherical Green’s functions for p- and s-polarized fields.
- Parameters:
- Kx, Ky
ndarray (rad/m) lateral wavevector components.
- DFMagLayer
float () dielectric function (permitivity) of the magnetic layer.
- wavelength
float (m ) wavelength of the light.
- tp, ts
listor array_like Fresnel coefficients for p- and s-polarization, respectively. Each is expected to have two elements (e.g.
tp[0]andtp[1]).
- Kx, Ky
- Returns:
- SpinWaveToolkit.bls.getBLSsignal(SweepBloch, KxKyBloch, Bloch, Exy, E, DF, PM, d, NA, Nq=30, source_layer_index=1, output_layer_index=0, wavelength=5.32e-07, collectionSpot=1e-06, focalLength=0.001)#
Calculate the BLS signal from the Bloch functions.
- Parameters:
- SweepBloch
ndarray Sweep vector of the Bloch functions with shape
(Nf,). Usually frequency of spin waves.- KxKyBloch
tuple[ndarray] (rad/m) tuple containing the 1D grids
(kx_grid, ky_grid)on which the Bloch functions are defined.- Bloch
ndarray Array with shape
(3, Nf, Nkx, Nky)containing the Bloch function components(Mx, My, Mz)for each frequency and KxKy grid point.- Exy
ndarray (m ) XY grid for the electric field. 2D array with shape
(Ny, Nx)containing the X and Y coordinates of the electric field.- E
ndarray (V/m) 3D array with shape
(3, Ny, Nx)containing the X, Y, Z components of the electric field.- DF
ndarray () vector of the complex dielectric functions for each material in the stack.
- PM
ndarray () vector of the complex permeability functions for each material in the stack.
- d
ndarray (m ) thickness of all layers in the stack excluding the superstrate and substrate. Usually just the thickness of the magnetic layer.
- NA
float Numerical aperture of the optical system.
- Nq
int, optional Number of points in the q-space grid. Default is 30.
- source_layer_index
int, optional Index of the source layer in the stack. Default is 1.
- output_layer_index
int, optional Index of the output layer in the stack. Default is 0.
- wavelength
float, optional (m ) wavelength of the light. Default is 532e-9.
- collectionSpot
float, optional (m ) collection spot size - used here as the beam waist. Default is 1e-6.
- focalLength
float, optional (m ) focal length of the lens. Default is 1e-3.
- SweepBloch
- Returns:
- ExS
ndarray (V/m) scattered electric field in the X axis. 1D array with shape
(Nf,)containing the scattered electric field in the X direction for each frequency in SweepBloch.- EyS
ndarray (V/m) scattered electric field in the Y axis. 1D array with shape
(Nf,)containing the scattered electric field in the Y direction for each frequency in SweepBloch.- Px, Py, Pz
ndarray (V/m) induced polarization in the magnetic layer. Corresponds to P in eq. (3) in Wojewoda et al. PRB 110, 224428 (2024). Each array has shape
(Nf, 2*Nq-1, 2*Nq-1).- Qx, Qy
ndarray (rad/m) k-space grids for polarizations Px, Py, Pz. Each array has shape
(2*Nq-1, 2*Nq-1).
- ExS