Public Documentation
These functions and types are to be used for transfer matrix calculation based on the sources used. If you wish to modify any of the steps in the calculation, refer to the private API.
Index
TransferMatrix.Layer
TransferMatrix.angle_resolved
TransferMatrix.calculate_tr
TransferMatrix.calculate_tr
TransferMatrix.calculate_tr
TransferMatrix.dbr_reflectivity
TransferMatrix.dielectric_constant
TransferMatrix.dielectric_tensor
TransferMatrix.electric_field
TransferMatrix.find_bounds
TransferMatrix.fresnel
TransferMatrix.refractive_index
TransferMatrix.stopband
TransferMatrix.tune_thickness
Transfer Matrix Functions
TransferMatrix.angle_resolved
— Methodangle_resolved(λs, θs, layers)
Calculate the transmission and reflection at different angles of incidence and wavelengths for a stack of layers.
Arguments
λs
: Vector of wavelengths.θs
: Vector of angles of incidence in radians.layers
: Vector ofLayer
objects representing the stack.
TransferMatrix.calculate_tr
— Functioncalculate_tr(layers, θ, μ)
Calculate the transmittance and reflectance spectrum of the structure at a single incidence angle θ. Accurate transmittance must be calculated via the Poynting vector. Reflectance is calculated directly from the transfer matrix elements.
TransferMatrix.calculate_tr
— Methodcalculate_tr(Γ)
Calculate reflectance and transmittance for the total stack. This takes the matrix Γ* in Passler, et al., but for brevity we call it Γ in this function.
The original formalism is from: Yeh, 1979, https://doi.org/10.1364/JOSA.69.000742
but the ordering of reflection/transmission coefficients is modified in Passler, et al. 2017 https://doi.org/10.1364/JOSAB.34.002128
TransferMatrix.calculate_tr
— Methodcalculate_tr(S::Poynting)
Calculate transmittance from the Poynting vector struct, which contains incident and transmitted energy for both p-polarized and s-polarized waves.
TransferMatrix.electric_field
— Functionelectric_field(layers, λ, θ; dz)
Calculate the electric field profile for the entire structure as a function of z for a given incidence angle θ.
TransferMatrix.tune_thickness
— Functiontune_thickness(λs, ts, layers, t_index, θ=0.0)
Tune the thickness of a specific layer in a stack and calculate the transmission and reflection.
Arguments
λs
: Vector of wavelengths.ts
: Vector of thicknesses.layers
: Vector ofLayer
objects representing the stack.t_index
: Index of the layer in the stack to tune the thickness of.θ
: Angle of incidence in radians. Default is 0.0 (normal incidence).
TransferMatrix.Layer
— TypeLayer(material, thickness)
Construct a single layer with keywords:
material
: refractive material containing dispersion and extinction data (if available)thickness
: thickness of the layer
TransferMatrix.dielectric_constant
— Methoddielectric_constant(n_re::Real, n_im::Real)
Return the complex dielectric function from the real and imaginary parts of the index of refraction.
The complex index of refraction, given by
n' = n_re + i * n_im
(in terms of nre and nim), can be used to obtain the frequency-dependent complex dielectric function
ε_r(ω) = ε' + iε''
via the relation
(n_re + i * n_im)^2 = ε' + iε''.
TransferMatrix.find_bounds
— Methodfind_bounds(layers)
Find the unitful z coordinate for all layer-layer interfaces in the structure, with the first interface starting at z = 0. (negative z corresponds to positions inside the first layer.)
TransferMatrix.refractive_index
— Methodrefractive_index()
Return a function that takes a wavelength and gives the real and imaginary parts of the refractive index
TransferMatrix.dielectric_tensor
— Methoddielectric_tensor(ε1, ε2, ε3)
Return the diagonal complex dielectric tensor
\[\varepsilon = \begin{pmatrix} \varepsilon_1 & 0 & 0 \\0 & \varepsilon_2 & 0 \\0 & 0 & \varepsilon_3 \end{pmatrix}\]
Miscellaneous Optics Functions
TransferMatrix.dbr_reflectivity
— Methoddbr_reflectivity(no, n2, n1, n2, N)
Approximate the reflectivity of a DBR structure with originating medium with refractive index no
, substrate with index ns
, and alternating materials with indices n1
and n2
and number of repetitions N
. The repeated pair of materials are assumed to have quarter-wave thickness $nd = \lambda / 4$, where $n$ is the refractive index, $d$ is the layer thickness, and $\lambda$ is the wavelength of the light.
TransferMatrix.fresnel
— Methodfresnel(θ, n1, n2)
Calculate the reflectance for s-polarized and p-polarized light given the incidence angle θ
and indices of refraction of two media n1
and n2
at a plane interface.
TransferMatrix.stopband
— Methodstopband(n1, n2)
Calculate the frequency bandwidth Δf of the photonic stopband for a distributed bragg reflector (DBR) with two alternating materials of refractive indices n1
and n2
.
\[ \frac{\Delta f_0}{f_0} = \frac{4}{\pi} \arcsin \left( \frac{n_2 - n_1}{n_2 + n_1} \right)\]