ErfInterfaceProfile#
- class optika.materials.profiles.ErfInterfaceProfile(width=<Quantity 0. nm>)[source]#
Bases:
AbstractInterfaceProfileStearns [1989] error function interface profile between two layers in a multilayer stack.
The interface profile, \(p(z)\) is defined as follows:
\[p(z) = \frac{1}{\pi} \int_{-\infty}^z e^{-t^2/2 \sigma^2} dt\]Examples
Plot an error function interface profile as a function of depth
import numpy as np import matplotlib.pyplot as plt import astropy.units as u import named_arrays as na import optika # Define an array of widths width = na.linspace(1, 2, axis="width", num=5) * u.nm # Define the interface profile p = optika.materials.profiles.ErfInterfaceProfile(width=width) # Define an array of depths into the material z = na.linspace(-5, 5, axis="z", num=101) * u.nm # Plot the interface profile as a function of depth fig, ax = plt.subplots(constrained_layout=True); na.plt.plot(z, p(z), ax=ax, axis="z", label=width); ax.set_xlabel(f"depth ({z.unit:latex_inline})"); ax.set_ylabel(f"interface profile"); ax.legend();
Plot the reflectivity of the error function interface profile as a function of incidence angle
# Define a wavelength wavelength = 304 * u.AA # Define an array of incidence angles angle = na.linspace(-90, 90, axis="angle", num=101) * u.deg # Define an array of direction cosines based off of the incidence angles direction = np.cos(angle) # Define the index of refraction of the current medium n = 1 # Calculate the reflectivity for the given angles reflectivity = p.reflectivity(wavelength, direction, n) # Plot the reflectivity of the interface profile as a function of # incidence angle fig, ax = plt.subplots(constrained_layout=True); na.plt.plot(angle, reflectivity, ax=ax, axis="angle", label=width); ax.set_xlabel(f"angle ({angle.unit:latex_inline})"); ax.set_ylabel(f"reflectivity"); ax.legend();
Attributes
The array shape of this object.
the width of the Gaussian in the intergrand of \(\text{erf}(x)\)
Methods
__init__([width])reflectivity(wavelength, direction, n)Calculate the loss of the reflectivity due to this interface profile.
to_string([prefix])Public-facing version of the
__repr__method that allows for defining a prefix string, which can be used to calculate how much whitespace to add to the beginning of each line of the result.transmissivity(wavelength, direction_before, ...)The specular transmission amplitude for this interface profile.
Inheritance Diagram

- Parameters:
width (Quantity | AbstractScalar)
- reflectivity(wavelength, direction, n)#
Calculate the loss of the reflectivity due to this interface profile.
- Parameters:
wavelength (Quantity | AbstractScalar) – the wavelength of the incident light in vacuum
direction (float | AbstractScalar) – The component of the incident light’s propagation direction antiparallel to the surface normal.
n (float | AbstractScalar) – The complex index of refraction of the medium before the interface.
normal – the vector perpendicular to the optical surface
- Return type:
- to_string(prefix=None)#
Public-facing version of the
__repr__method that allows for defining a prefix string, which can be used to calculate how much whitespace to add to the beginning of each line of the result.
- transmissivity(wavelength, direction_before, direction_after, n_before, n_after)#
The specular transmission amplitude for this interface profile.
- Parameters:
wavelength (Quantity | AbstractScalar) – The wavelength of the incident light in vacuum.
direction_before (float | AbstractScalar) – The component of the incident light’s propagation direction before the interface antiparallel to the surface normal.
direction_after (float | AbstractScalar) – The component of the incident light’s propagation direction after the interface antiparallel to the surface normal.
n_before (float | AbstractScalar) – The complex index of refraction of the medium before the interface.
n_after (float | AbstractScalar) – The complex index of refraction of the medium after the interface.
- Return type:
Notes
The specular transmission amplitude is given by Stearns [1989] Equation 42.
- width: Quantity | AbstractScalar = <Quantity 0. nm>#
the width of the Gaussian in the intergrand of \(\text{erf}(x)\)