AbstractLayerSequence#

class optika.materials.AbstractLayerSequence[source]#

Bases: AbstractLayer

An interface describing a sequence of layers.

Attributes

interface

The interface profile on the left side of this layer.

layer_sequence

This object interpreted as an instance of LayerSequence.

layers

A sequence of layers.

shape

The array shape of this object.

thickness

The thickness of this layer.

Methods

__init__()

n(wavelength)

The index of refraction on the left side of the layer.

plot([x, z, width, ax])

Plot this layer.

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.

transfer(wavelength, direction, polarized_s, n)

Compute the index of refraction, internal propagation direction, transfer matrix, and where the transfer matrix is valid for this layer, which propagates the electric field from the left side of the layer to the right side.

Inheritance Diagram

Inheritance diagram of optika.materials.AbstractLayerSequence
abstractmethod n(wavelength)#

The index of refraction on the left side of the layer.

Parameters:

wavelength (Quantity | AbstractScalar) – The wavelength of the incident light in vacuum

Return type:

AbstractScalar

plot(x=<Quantity 0. nm>, z=<Quantity 0. nm>, width=<Quantity 10. nm>, ax=None, **kwargs)#

Plot this layer.

Parameters:
  • x (Quantity) – The horizontal offset of the plotted layer

  • z (Quantity) – The vertical offset of the plotted layer.

  • width (Quantity) – The horizontal width of the plotted layer.

  • ax (None | Axes) – The matplotlib axes instance on which to plot the layer.

  • kwargs – Additional keyword arguments to pass into.

Return type:

list[Polygon]

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

abstractmethod transfer(wavelength, direction, polarized_s, n, where=True)#

Compute the index of refraction, internal propagation direction, transfer matrix, and where the transfer matrix is valid for this layer, which propagates the electric field from the left side of the layer to the right side.

Parameters:
  • wavelength (Quantity | AbstractScalar) – The wavelength of the incident light in vacuum.

  • direction (float | AbstractScalar) – The component of the incident light’s propagation direction in the medium before this layer antiparallel to the surface normal.

  • polarized_s (bool | AbstractScalar) – If True, the incident light is \(s\)-polarized. If False, the incident light is \(p\)-polarized.

  • n (float | AbstractScalar) – The complex index of refraction of the medium before this layer.

  • where (bool | AbstractScalar) – The boolean mask that should be applied to the transfer matrix. True where the transfer matrix is invertible.

Return type:

tuple[AbstractScalar, AbstractScalar, Cartesian2dMatrixArray, AbstractScalar]

abstract property interface: None | AbstractInterfaceProfile#

The interface profile on the left side of this layer.

abstract property layer_sequence: LayerSequence#

This object interpreted as an instance of LayerSequence.

abstract property layers: Sequence[AbstractLayer]#

A sequence of layers.

abstract property shape: dict[str, int]#

The array shape of this object.

abstract property thickness: Quantity | AbstractScalar#

The thickness of this layer.