pyoptics.thin_films

Thin film reflection and transmission coefficients.

Convention: fields vary as exp(i(k.r - omega*t)), as in Zangwill. Absorbing layers therefore have the complex refractive index n + i*k with k > 0, and a layer of thickness t adds the phase +k_0*(n + i*k)*cos(theta)*t. McLeod’s characteristic matrices (exp(+i*omega*t), n - i*k) enter as their complex conjugates.

References

  1. Zangwill, “Modern Electrodynamics”, Cambridge University Press (2013).

  1. Brooker, “Modern Classical Optics”, Oxford University Press (2003).

H. A. Macleod, “Thin-Film Optical Filters”, 3rd ed., Institute of Physics Publishing (2001).

  1. Yeh, “Optical Waves in Layered Media”, Wiley (1988).

M. Born and E. Wolf, “Principles of Optics”, 7th ed., Cambridge University Press (1999).

Functions

R_T_A_coeffs

Same as r_t_coeffs, but for intensity reflectance and transmittance.

r_t_coeffs

Reflection and transmission coefficients for a thin film stack.

stack_transfer_functions

Reflection and transmission of a layer stack as transfer functions for the angular spectrum of a field.

pyoptics.thin_films.r_t_coeffs(angle, n, k, t, embedding_n, embedding_k, substrate_n, substrate_k, pol, wavelength, phi0=None)[source]

Reflection and transmission coefficients for a thin film stack.

Parameters:
angledouble

Incident angle in embedding medium.

n , karrays

Real and imaginary parts of the refractive indices of the thin film stack, n + i*k (k > 0 for absorption).

tarrays

Thicknesses of the layers.

embedding_n, embedding_k, substrate_n, substrate_kdouble

Real and imaginary parts of the embedding medium’s and the substrate’s refractive index. Both the embedding medium and the substrate are taken be infinitely extend.

polstring

“s” or “p” polarization. Also accepted: “TE” or “TM”.

Returns:
r, tdouble

Reflection and transmission amplitude of the stack.

pyoptics.thin_films.stack_transfer_functions(x, y, n, k, t, embedding_n, embedding_k, substrate_n, substrate_k, pol, wavelength, normal_order=True)[source]

Reflection and transmission of a layer stack as transfer functions for the angular spectrum of a field.

A field in a plane z = const in the embedding medium is a superposition of plane waves exp(i*(k_x*x + k_y*y + k_z*z)), whose amplitudes FT() yields (see pyoptics.fft). Each plane wave hits the stack (layers parallel to the x-y plane, light incident from the embedding medium towards +z) under the angle given by sin(theta_0) = sqrt(k_x**2 + k_y**2)/(k_0*n_0) and is reflected and transmitted with r(theta_0) and t(theta_0) of r_t_coeffs(). Thus

E_reflected = inv_FT(r*FT(E_incident)),
E_transmitted = inv_FT(t*FT(E_incident)),

with E_incident and E_reflected taken at the top of the stack (the interface embedding medium/first layer) and E_transmitted at its bottom (last layer/substrate). Propagate them with the propagators to other planes. Note that reflected plane waves run towards -z: with the convention exp(i(k.r - omega*t)), propagating the reflected field by a distance d away from the stack means using exp(+i*k_z*d) as for the incident field, i.e. the usual propagators applied to E_reflected.

This is a scalar model: the field is one tangential component of the electric field, and all plane waves are treated as either s (TE) or p (TM) polarized. This is exact for fields that only vary along x (k_y = 0) with the electric field along y (pol=”TE”) or the magnetic field along y (pol=”TM”), and a good approximation for small angular spectra. Plane waves with sin(theta_0) > 1 are evanescent in the embedding medium; they are included with the complex angle that the formulas give (e.g. frustrated total internal reflection).

Parameters:
x, yarrays

Linear coordinates of the field’s grid.

n, k, tarrays

Refractive indices n + i*k and thicknesses of the layers (top to bottom). Empty arrays describe a single interface.

embedding_n, embedding_k, substrate_n, substrate_knumbers

Refractive index of the embedding medium (incidence side) and the substrate.

polstring

“s”/”TE” or “p”/”TM”.

wavelengthnumber

Vacuum wavelength.

normal_orderboolean, optional

If True (default), the arrays are centered as FT() expects; if False, they are in the standard order of numpy.fft.fft2().

Returns:
r, tarrays

Complex transfer functions of shape (Ny, Nx), ratios of the tangential electric field components as in r_t_coeffs().

pyoptics.thin_films.R_T_A_coeffs(angle, n, k, t, embedding_n, embedding_k, substrate_n, substrate_k, pol, wavelength, incoherent=None, N_phases=None)[source]

Same as r_t_coeffs, but for intensity reflectance and transmittance. Also return ‘absorbtance’ such that R + T + A = 1.

Parameters:
angledouble

Incident angle in embedding medium.

n , karrays

Real and imaginary parts of the refractive indices of the thin film stack.

tarrays

Thicknesses of the layers.

embedding_n, embedding_k, substrate_n, substrate_kdouble

Real and imaginary parts of the embedding medium’s and the substrate’s refractive index. Both the embedding medium and the substrate are taken be infinitely extend.

polstring

“s” or “p” polarization. Also accepted: “TE” or “TM”.

wavelengthnumber

Wavelength of incident light.

incoherentarray, boolean, optional

Element i is True if the i-th layer is “incoherent” (i.e. such that phase information is lost). Defaults to None which is interpreted as full coherence in all layers.

N_phasesint, optional

Use N_phases phase offsets for incoherent layers in averaging. Only used if at least one incoherent layer is present.

Notes

A = 0 can only be expected for losless media under the condition that the embeddig medium is equal to the substrate.