LinearInterfaceProfile#

class optika.materials.profiles.LinearInterfaceProfile(width=<Quantity 0. nm>)[source]#

Bases: AbstractInterfaceProfile

Stearns [1989] linear function interface profile between two layers in a multilayer stack.

The interface profile, \(p(z)\) is defined as follows:

\[\begin{split}p(z) = \begin{cases} 0, & z < -\sqrt{3} \sigma \\ \frac{1}{2} + \frac{z}{2 \sqrt{3} \sigma}, & |z| \leq \sqrt{3} \sigma \\ 1, & z > \sqrt{3} \sigma \end{cases}\end{split}\]

Examples

Plot an linear 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.LinearInterfaceProfile(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();
../_images/optika.materials.profiles.LinearInterfaceProfile_0_0.png

Plot the reflectivity of the linear 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();
../_images/optika.materials.profiles.LinearInterfaceProfile_1_0.png

Attributes

shape

The array shape of this object.

width

the width of the linear region

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

Inheritance diagram of optika.materials.profiles.LinearInterfaceProfile
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:

AbstractScalar

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.

Parameters:

prefix (None | str) – an optional string, the length of which is used to calculate how much whitespace to add to the result.

Return type:

str

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:

AbstractScalar

Notes

The specular transmission amplitude is given by Stearns [1989] Equation 42.

property shape: dict[str, int]#

The array shape of this object.

width: Quantity | AbstractScalar = <Quantity 0. nm>#

the width of the linear region