elli package

Subpackages

Submodules

elli.experiment module

class elli.experiment.Experiment(structure, lbda, theta_i, vector=[1, 0, 1, 0])[source]

Bases: object

Description of a virtual experiment to simulate the behavior of a structure.

Creates a virtual experiment to simulate the behavior of a structure.

Parameters
  • structure (Structure) – Structure object to evaluate.

  • lbda (npt.ArrayLike) – Single value or array of wavelengths (in nm).

  • theta_i (float) – Incident angle (in degrees).

  • vector (npt.ArrayLike, optional) – Jones or Stokes vector of incident light. Defaults to [1, 0, -1, 0].

evaluate(solver=<class 'elli.solver4x4.Solver4x4'>, **solver_kwargs)[source]

Evaluates the experiment with the given solver.

Parameters
  • solver (Solver, optional) – Choose which solver class is used. Defaults to Solver4x4.

  • solver_kwargs (optional) – Keyword arguments for the Solver can be appended as arguments.

Returns

Result of the experiment.

Return type

Result

jones_vector = None
lbda = None
set_lbda(lbda)[source]

Set experiment wavelengths.

Parameters

lbda (npt.ArrayLike) – single value or array of wavelengths (in nm).

set_structure(structure)[source]

Defines the Structure to evaluate.

Parameters

structure (Structure) – Structure object to evaluate.

set_theta(theta_i)[source]

Set incident angle to evaluate.

Parameters

theta_i (float) – Incident angle (in degrees).

set_vector(vector)[source]

Defines the Jones or Stokes vector of the incident Light.

Jones: [1, 0]: horizontal polarized [0, 1]: vertical polarized [1/sqrt(2), 1/sqrt(2)]: diagonal polarized [1/sqrt(2),-1/sqrt(2)]: anti-diagonal polarized

Stokes: [1,0,0,0]: unpolarized light [1,1,0,0]: horizontal polarized [1,-1,0,0]: vertical polarized [1,0,1,0]: diagonal polarized [1,0,-1,0]: anti-diagonal polarized

Parameters

vector (npt.ArrayLike) – Jones or Stokes vector of incident light.

stokes_vector = None
structure = None
theta_i = None

elli.materials module

class elli.materials.BiaxialMaterial(law_x, law_y, law_z)[source]

Bases: elli.materials.SingleMaterial

Biaxial material.

Creates a biaxial material with three dispersion laws.

Parameters
  • law_x (DispersionLaw) – Dispersion relation for x crystal axes.

  • law_y (DispersionLaw) – Dispersion relation for y crystal axes.

  • law_z (DispersionLaw) – Dispersion relation for z crystal axes.

set_dispersion(law_x, law_y, law_z)[source]

Sets dipsersion relations of the biaxial material.

Parameters
  • law_x (DispersionLaw) – Dispersion relation for x crystal axes.

  • law_y (DispersionLaw) – Dispersion relation for y crystal axes.

  • law_z (DispersionLaw) – Dispersion relation for z crystal axes.

class elli.materials.IsotropicMaterial(law)[source]

Bases: elli.materials.SingleMaterial

Isotropic material.

Creates isotropic material with a dispersion law.

Parameters

law (DispersionLaw) – Dispersion relation of all three crystal directions.

set_dispersion(law)[source]

Sets dipsersion relation of the isotropic material.

Parameters

law (DispersionLaw) – Dispersion relation of all three crystal directions.

class elli.materials.LooyengaEMA(host_material, guest_material, fraction)[source]

Bases: elli.materials.MixtureMaterial

Mixture Material approximated with Looyenga’s formula. Valid if materials have small contrast. Looyenga, H. (1965). Physica, 31(3), 401–406.

Creates a material mixture from two materials.

Parameters
  • host_material (Material) – Host Material.

  • guest_material (Material) – Material incorporated in the host.

  • fraction (float) – Fraction of the guest material (Range 0 - 1).

get_tensor(lbda)[source]

Gets the permittivity tensor of the marterial for wavelength ‘lbda’.

Parameters

lbda (npt.ArrayLike) – Single value or array of wavelengths (in nm).

Returns

Permittivity tensor.

Return type

npt.NDArray

class elli.materials.Material[source]

Bases: abc.ABC

Base class for materials (abstract).

get_refractive_index(lbda)[source]

Gets the refractive index tensor for wavelength ‘lbda’.

Parameters

lbda (npt.ArrayLike) – Single value or array of wavelengths (in nm).

Returns

Refractive index tensor.

Return type

npt.NDArray

abstract get_tensor(lbda)[source]

Gets the permittivity tensor of the marterial for wavelength ‘lbda’.

Parameters

lbda (npt.ArrayLike) – Single value or array of wavelengths (in nm).

Returns

Permittivity tensor.

Return type

npt.NDArray

class elli.materials.MaxwellGarnetEMA(host_material, guest_material, fraction)[source]

Bases: elli.materials.MixtureMaterial

Mixture Material approximated with the Maxwell Garnet formula. It is valid for spherical inclusions with small volume fraction.

Creates a material mixture from two materials.

Parameters
  • host_material (Material) – Host Material.

  • guest_material (Material) – Material incorporated in the host.

  • fraction (float) – Fraction of the guest material (Range 0 - 1).

get_tensor(lbda)[source]

Gets the permittivity tensor of the marterial for wavelength ‘lbda’.

Parameters

lbda (npt.ArrayLike) – Single value or array of wavelengths (in nm).

Returns

Permittivity tensor.

Return type

npt.NDArray

class elli.materials.MixtureMaterial(host_material, guest_material, fraction)[source]

Bases: elli.materials.Material

Abstract Class for mixed materials.

Creates a material mixture from two materials.

Parameters
  • host_material (Material) – Host Material.

  • guest_material (Material) – Material incorporated in the host.

  • fraction (float) – Fraction of the guest material (Range 0 - 1).

fraction = None
abstract get_tensor(lbda)[source]

Gets the permittivity tensor of the marterial for wavelength ‘lbda’.

Parameters

lbda (npt.ArrayLike) – Single value or array of wavelengths (in nm).

Returns

Permittivity tensor.

Return type

npt.NDArray

guest_material = None
host_material = None
set_constituents(host_material, guest_material)[source]

Sets Materials in the mixture.

Parameters
  • host_material (Material) – Host Material.

  • guest_material (Material) – Material incorporated in the host.

set_fraction(fraction)[source]

Sets fraction and checks if fraction is in range from 0 to 1.

Parameters

fraction (float) – Fraction of the guest material (Range 0 - 1).

class elli.materials.SingleMaterial[source]

Bases: elli.materials.Material

Base class for non mixed materials (abstract).

get_tensor(lbda)[source]

Gets the permittivity tensor of the marterial for wavelength ‘lbda’.

Parameters

lbda (npt.ArrayLike) – Single value or array of wavelengths (in nm).

Returns

Permittivity tensor.

Return type

npt.NDArray

law_x = None
law_y = None
law_z = None
rotated = False
rotation_matrix = None
abstract set_dispersion()[source]

Sets dispersion relation of the material.

set_rotation(r)[source]

Sets rotation of the Material.

Parameters

r (npt.NDArray) – rotation matrix (from rotation_Euler() or others)

class elli.materials.UniaxialMaterial(law_o, law_e)[source]

Bases: elli.materials.SingleMaterial

Uniaxial material.

Creates a uniaxial material with two dispersion laws.

Parameters
  • law_o (DispersionLaw) – Dispersion relation for ordinary crystal axes (x and y direction).

  • law_e (DispersionLaw) – Dispersion relation for extraordinary crystal axis (z direction).

set_dispersion(law_o, law_e)[source]

Sets dipsersion relations of the uniaxial material.

Parameters
  • law_o (DispersionLaw) – Dispersion relation for ordinary crystal axes (x and y direction).

  • law_e (DispersionLaw) – Dispersion relation for extraordinary crystal axis (z direction).

class elli.materials.VCAMaterial(host_material, guest_material, fraction)[source]

Bases: elli.materials.MixtureMaterial

Mixture Material approximated with a simple virtual crystal like average.

Creates a material mixture from two materials.

Parameters
  • host_material (Material) – Host Material.

  • guest_material (Material) – Material incorporated in the host.

  • fraction (float) – Fraction of the guest material (Range 0 - 1).

get_tensor(lbda)[source]

Gets the permittivity tensor of the marterial for wavelength ‘lbda’.

Parameters

lbda (npt.ArrayLike) – Single value or array of wavelengths (in nm).

Returns

Permittivity tensor.

Return type

npt.NDArray

elli.materials_db module

elli.math module

elli.math.lambda2E(lbda)[source]

Converts wavelength values to energy values. E = c * h_bar / lambda

Parameters

lbda (npt.ArrayLike) – Single value or array of wavelengths in ‘nm’

Returns

Energy in eV

Return type

npt.ArrayLike

elli.math.rotation_euler(p, n, r)[source]

Returns rotation matrix defined by Euler angles p, n, r.

Successive rotations : z,x’,z’ Note : The inverse rotation is -r, -n, -p

Parameters
  • p (float) – precession angle, 1st rotation, around z (0..360°)

  • n (float) – nutation angle, 2nd rotation, around x’ (0..180°)

  • r (float) – 3rd rotation, around z’ (0..360°)

Returns

rotation matrix M_R

Return type

npt.NDArray

elli.math.rotation_v(v)[source]

Returns rotation matrix defined by a rotation vector v.

The calculation is made with the matrix exponential M_R = exp(W), with W_{ij} = - ε_{ijk} V_{k}, where ε_{ijk} is the Levi-Civita antisymmetric tensor. If V is separated in a unit vector v and a magnitude θ, V = θ·v, with θ = ∥V∥, the calculation of the matrix exponential is avoided, and only sin(θ) and cos(θ) are needed instead.

Note : The inverse rotation is -v

Parameters

v (npt.ArrayLike) – rotation vector (list or array)

Returns

rotation matrix M_R

Return type

npt.NDArray

elli.math.rotation_v_theta(v, theta)[source]

Returns rotation matrix defined by a unit rotation vector and an angle.

Notes : The inverse rotation is (v,-theta)

Parameters
  • v (npt.ArrayLike) – unit vector orienting the rotation (list or array)

  • theta (float) – rotation angle around v in degrees

Returns

rotation matrix M_R

Return type

npt.NDArray

elli.result module

class elli.result.Result(experiment, jones_matrix_r, jones_matrix_t, power_correction=None)[source]

Bases: object

Record of a simulation result.

Creates result object, to store simulation data. Gets called by solvers.

Parameters
  • experiment (Experiment) – Evalatued experiment, with structure and experimental parameters.

  • jones_matrix_r (npt.NDArray) – Jones matrix for the reflection direction.

  • jones_matrix_t (npt.NDArray) – Jones matrix for the transmission direction.

  • power_correction (npt.NDArray) – Correction factors, to get the power transmission values.

property R
property Rc
property T
property Tc
property delta
property delta_matrix
get(name)[source]

Return the data for the requested variable ‘name’.

Parameters

name (str) – Variable name to return. Examples for ‘name’: ‘r_sp’ : Amplitude reflection coefficient from ‘s’ to ‘p’ polarization. ‘r_LR’ : Reflection from circular right to circular left polarization. ‘T_pp’ : Power transmission coefficient from ‘p’ to ‘p’ polarization. ‘Ψ_ps’, ‘Δ_pp’ : Ellipsometry parameters. ‘psi’, ‘delta’, ‘rho’: Reduced ellipsometry parameters, the whole matricies are returned by ‘psi_matrix’.

Returns

Array of data.

Return type

npt.NDArray

property jones_matrix_r
property jones_matrix_rc
property jones_matrix_t
property jones_matrix_tc
property mueller_matrix
property psi
property psi_matrix
property rho
property rho_matrix
class elli.result.ResultList(results=None)[source]

Bases: object

Class to make a row of Results easier to handle.

Creates an ResultList object.

Parameters

results (List[Result], optional) – List of results to store. Defaults to None.

append(result)[source]

Append a single Result to the ResultList.

Parameters

result (Result) – Additional Result to store.

elli.solver module

class elli.solver.Solver(experiment)[source]

Bases: abc.ABC

Solver base class to evaluate Experiment objects. Here the experiment and structure get unpacked and the simulation results get returned.

The actual simulation is handled by subclasses. Because of this, this class should never be called.

abstract calculate()[source]
experiment = None
jones_vector = None
lbda = None
permittivity_profile = None
structure = None
theta_i = None

elli.solver2x2 module

class elli.solver2x2.Solver2x2(experiment)[source]

Bases: elli.solver.Solver

Solver class to evaluate Experiment objects. Simple but fast 2x2 transfer matrix method. Cannot handle anisotropy or anything fancy, thus Jonas and Mueller matrices cannot be calculated (respective functions return None).

calculate()[source]

Calculates the transfer matrix for the given material stack

static fresnel(n_i, n_t, th_i, th_t)[source]

Calculate fresnel coefficients at the interface of two materials

n_i: Refractive index of the material of the incident wave n_t: Refractive index of the material of the transmitted wave thi_i: Incident angle of the incident wave thi_t: Refracted angle of the transmitted wave

Returns

s-polarized reflection coefficient r_p: p-polarized reflection coefficient t_s: s-polarized transmission coefficient t_p: p-polarized transmission coefficient

Return type

r_s

static is_forward_angle(n, theta)[source]
list_snell(n_list)[source]

elli.solver4x4 module

class elli.solver4x4.Propagator[source]

Bases: abc.ABC

Propagator abstract base class.

abstract calculate_propagation(delta, h, lbda)[source]

Calculates propagation for a given Delta matrix and layer thickness.

Parameters
  • delta (npt.NDArray) – Delta Matrix

  • h (float) – Thickness of layer (nm)

  • lbda (npt.ArrayLike) – Wavelengths to evaluate (nm)

Returns

Propagator for the given layer

Return type

npt.NDArray

class elli.solver4x4.PropagatorEig[source]

Bases: elli.solver4x4.Propagator

Propagator class using the eigenvalue decomposition method.

calculate_propagation(delta, h, lbda)[source]

Calculates propagation for a given Delta matrix and layer thickness with eigenvalue decomposition.

Parameters
  • delta (npt.NDArray) – Delta Matrix

  • h (float) – Thickness of layer (nm)

  • lbda (npt.ArrayLike) – Wavelengths to evaluate (nm)

Returns

Propagator for the given layer

Return type

npt.NDArray

class elli.solver4x4.PropagatorExpmScipy[source]

Bases: elli.solver4x4.Propagator

Propagator class using the Padé approximation of the matrix exponential.

calculate_propagation(delta, h, lbda)[source]

Calculates propagation for a given Delta matrix and layer thickness with the Padé approximation of the matrix exponential.

Parameters
  • delta (npt.NDArray) – Delta Matrix

  • h (float) – Thickness of layer (nm)

  • lbda (npt.ArrayLike) – Wavelengths to evaluate (nm)

Returns

Propagator for the given layer

Return type

npt.NDArray

class elli.solver4x4.PropagatorExpmTF[source]

Bases: elli.solver4x4.Propagator

Propagator class using a vectorized Padé approximation of the matrix exponential

calculate_propagation(delta, h, lbda)[source]

Calculates propagation for a given Delta matrix and layer thickness with the Padé approximation of the matrix exponential.

Parameters
  • delta (npt.NDArray) – Delta Matrix

  • h (float) – Thickness of layer (nm)

  • lbda (npt.ArrayLike) – Wavelengths to evaluate (nm)

Returns

Propagator for the given layer

Return type

npt.NDArray

class elli.solver4x4.PropagatorExpmTorch[source]

Bases: elli.solver4x4.Propagator

Propagator class using a vectorized polynomial approximation of the matrix exponential.

calculate_propagation(delta, h, lbda)[source]

Calculates propagation for a given Delta matrix and layer thickness with the polynomial approximation of the matrix exponential.

Parameters
  • delta (npt.NDArray) – Delta Matrix

  • h (float) – Thickness of layer (nm)

  • lbda (npt.ArrayLike) – Wavelengths to evaluate (nm)

Returns

Propagator for the given layer

Return type

npt.NDArray

class elli.solver4x4.PropagatorLinear[source]

Bases: elli.solver4x4.Propagator

Propagator class using a simple linear approximation of the matrix exponential.

calculate_propagation(delta, h, lbda)[source]

Calculates propagation for a given Delta matrix and layer thickness with a linear approximation of the matrix exponential.

Parameters
  • delta (npt.NDArray) – Delta Matrix

  • h (float) – Thickness of layer (nm)

  • lbda (npt.ArrayLike) – Wavelengths to evaluate (nm)

Returns

Propagator for the given layer

Return type

npt.NDArray

class elli.solver4x4.Solver4x4(experiment, propagator=<elli.solver4x4.PropagatorExpmScipy object>)[source]

Bases: elli.solver.Solver

Solver class to evaluate Experiment objects. Based on Berreman’s 4x4 method.

static build_delta_matrix(k_x, eps)[source]

Calculates Delta matrix for given permittivity and reduced wave number.

Parameters
  • k_x (npt.ArrayLike) – reduce wave number, Kx = kx/k0

  • eps (npt.NDArray) – permittivity tensor

Returns

Delta 4x4 matrix: infinitesimal propagation matrix

Return type

npt.NDArray

calculate()[source]

Calculates transition matrices for every element in the structure and resulting Jones matrices.

Returns

Result object with calculation results

Return type

Result

static get_k_z(material, lbda, k_x)[source]

Calculates Kz in a material

Parameters
  • material (Material) – Material of the half-space

  • lbda (npt.ArrayLike) – Wavelengths to evaluate (nm)

  • k_x (npt.ArrayLike) – Reduced wavenumber, Kx = kx/k0

Returns

value of Kz in the material

Return type

npt.NDArray

static transition_matrix_halfspace(delta)[source]

Returns transition exit matrix L for any half-space.

Sort eigenvectors of the Delta matrix according to propagation direction first, then according to $y$ component.

Returns eigenvectors ordered like (s+,s-,p+,p-)

Parameters

delta (npt.NDArray) – Delta 4x4 matrix: infinitesimal propagation matrix

Returns

Translation matrix for semi-infinite half-spaces

Return type

npt.NDArray

static transition_matrix_iso_halfspace(k_x, epsilon, inv=False)[source]

Returns transition incident or exit matrix L for isotropic half-spaces.

Parameters
  • k_x (npt.ArrayLike) – Reduced wavenumber, Kx = kx/k0

  • epsilon (npt.ArrayLike) – dielectric tensor

  • inv (bool, optional) – If True, returns inverse transition matrix L^-1, used for the incident Matrix Li. Defaults to False.

Returns

transition matrix L

Return type

npt.NDArray

elli.spectraray module

A helper class to load data from SpectraRay ASCII Files

class elli.spectraray.SpectraRay(path)[source]

Bases: object

static eV2nm(wlen)[source]
loadDispersionTable(fname)[source]
static read_mmatrix(fname, decimal='.')[source]

Read a Mueller matrix from a Sentech ASCII file. Save the file in SpectraRay under Save As -> Ascii (.txt)

static read_psi_delta_file(fname, decimal='.')[source]
static read_rho(fname, decimal='.')[source]

elli.structure module

class elli.structure.AbstractLayer[source]

Bases: abc.ABC

Abstract class for a layer.

d = None
abstract get_permittivity_profile(lbda)[source]

Returns the permittivity profile of the layer for the given wavelengths.

Parameters

lbda (npt.ArrayLike) – Single value or array of wavelengths (in nm).

Returns

Returns list of tuples [(thickness, dielectric tensor), …]

Return type

List[Tuple[float, npt.NDArray]]

set_thickness(d)[source]

Defines the thickness of the layer in nm.

Parameters

d (float) – Thickness of the layer in nm.

class elli.structure.InhomogeneousLayer(material, d)[source]

Bases: elli.structure.Layer

Abstract base class for inhomogeneous layers with varying properties in z-direction.

New layer of material ‘material’, with thickness ‘d’

Parameters
  • material (Material) – Material object

  • d (float) – Thickness of layer (in nm)

div = None
get_permittivity_profile(lbda)[source]

Returns the permittivity profile of the layer for the given wavelengths. The tensor is evaluated in the middle of each slice.

Parameters

lbda (npt.ArrayLike) – Single value or array of wavelengths (in nm).

Returns

Returns list of tuples [(d1, epsilon1), (d2, epsilon2), …]

Return type

List[Tuple[float, npt.NDArray]]

get_slices()[source]

Returns z slicing with the position relative to this layer, not to the whole structure.

Returns

array of ‘z’ positions [z0, z1,… , zmax], with z0 = 0 and zmax = z{d+1}

Return type

npt.NDArray

abstract get_tensor(z, lbda)[source]

Returns permittivity tensor matrix for position ‘z’.

set_divisions(div)[source]

Defines the number of slices to simulate the layer.

Parameters

div (int) – Number of slices for the layer

class elli.structure.Layer(material, d)[source]

Bases: elli.structure.AbstractLayer

Homogeneous layer of dielectric material.

New layer of material ‘material’, with thickness ‘d’

Parameters
  • material (Material) – Material object

  • d (float) – Thickness of layer (in nm)

get_permittivity_profile(lbda)[source]

Returns the permittivity profile of the layer for the given wavelengths.

Parameters

lbda (npt.ArrayLike) – Single value or array of wavelengths (in nm).

Returns

Returns a list containing one tuple [(thickness, dielectric tensor)]

Return type

List[Tuple[float, npt.NDArray]]

set_material(material)[source]

Defines the material for the layer.

Parameters

material (Material) – Material object

class elli.structure.RepeatedLayers(layers, repetitions, before=0, after=0)[source]

Bases: elli.structure.AbstractLayer

Repeated structure of layers.

Create a repeated structure of layers.

Example : For layers [1,2,3] with n=2, before=1 and after=0, the structure will be 3123123.

Parameters
  • layers (List[AbstractLayer]) – List of the repeated layers, starting from z=0

  • repetitions (int) – Number of repetitions

  • before (int, optional) – Number of additional layers before the first period. Defaults to 0.

  • after (int, optional) – Number of additional layers after the last period. Defaults to 0.

after = None
before = None
get_permittivity_profile(lbda)[source]

Returns the permittivity profile of the layer for the given wavelengths.

Parameters

lbda (npt.ArrayLike) – Single value or array of wavelengths (in nm).

Returns

Returns list of tuples [(thickness, dielectric tensor), …]

Return type

List[Tuple[float, npt.NDArray]]

layers = None
repetitions = None
set_layers(layers)[source]

Set list of layers.

Parameters

layers (List[AbstractLayer]) – List of the repeated layers, starting from z=0

set_repetitions(repetitions, before=0, after=0)[source]

Defines the number of repetitions and the first and last layers.

Example : For layers [1,2,3] with n=2, before=1 and after=0, the structure will be 3123123.

Parameters
  • repetitions (int) – Number of repetitions

  • before (int, optional) – Number of additional layers before the first period. Defaults to 0.

  • after (int, optional) – Number of additional layers after the last period. Defaults to 0.

class elli.structure.Structure(front, layers, back)[source]

Bases: object

Description of the whole structure.

Consists of: - front half-space (incident) - back half-space (exit) - layer succession

Creates a structure.

Parameters
  • front (IsotropicMaterial) – IsotropicMaterial used as front half space

  • layers (List[Layer]) – List of Layers, starting from z=0

  • back (Material) – Material used as back half space

back_material = None
evaluate(lbda, theta_i, solver=<class 'elli.solver4x4.Solver4x4'>, **solver_kwargs)[source]

Return the Evaluation of the structure for the given parameters with standard settings.

Parameters
  • lbda (npt.ArrayLike) – Single value or array of wavelengths (in nm).

  • theta_i (float) – Incident angle of the experiment (in degrees).

  • solver (Solver, optional) – Choose which solver class is used. Defaults to Solver4x4.

  • solver_kwargs (optional) – Keyword arguments for the Solver can be appended as arguments.

Returns

Result of the experiment.

Return type

Result

front_material = None
get_permittivity_profile(lbda)[source]

Returns the permittivity profile of the complete structure for the given wavelengths.

Parameters

lbda (npt.ArrayLike) – Single value or array of wavelengths (in nm).

Returns

Returns list of tuples [(thickness, dielectric tensor), …]

Return type

List[Tuple[float, npt.NDArray]]

layers = []
set_back_material(material)[source]

Defines the back half-space material.

Parameters

material (Material) – Material used as back half space

set_front_material(material)[source]

Defines the front half-space material. Has to be isotropic.

Parameters

material (IsotropicMaterial) – IsotropicMaterial used as front half space

set_layers(layers)[source]

Sets sequence of layers.

Parameters

layers (List[Layer]) – List of Layers, starting from z=0

class elli.structure.TwistedLayer(material, d, div, angle)[source]

Bases: elli.structure.InhomogeneousLayer

Twisted layer. The material gets rotated around the z axis.

Creates a layer with a twisted material.

Parameters
  • material (Material) – Material object

  • d (float) – Thickness of layer (in nm)

  • div (int) – Number of slices for the layer

  • angle (float) – rotation angle over the distance ‘d’ (in degrees)

get_tensor(z, lbda)[source]

Gets permittivity tensor matrix for position ‘z’ and wavelength ‘lbda’.

Parameters
  • z (float) – Position in the layer (in nm)

  • lbda (npt.ArrayLike) – Single value or array of wavelengths (in nm).

Returns

Permittivity tensor for position ‘z’ and wavelength ‘lbda’.

Return type

npt.NDArray

set_angle(angle)[source]

Defines the total twist angle of this layer.

Parameters

angle (float) – Rotation angle over the thickness ‘d’ of the layer (in degrees)

class elli.structure.VaryingMixtureLayer(material, d, div, fraction_modulation)[source]

Bases: elli.structure.InhomogeneousLayer

Mixture layer, with varying fraction.

Creates a layer with a mixture material varying in z direction.

Parameters
  • material (MixtureMaterial) – MixtureMaterial object

  • d (float) – Thickness of layer (in nm)

  • div (int) – Number of slices for the layer

  • fraction_modulation (Callable[[float], float]) – Function to modify the fraction amount, takes float from 0 to 1 (top to bottom of layer), should return fraction at that level

fraction_modulation = None
get_tensor(z, lbda)[source]

Gets permittivity tensor matrix for position ‘z’ and wavelength ‘lbda’.

Parameters
  • z (float) – Position in the layer (in nm)

  • lbda (npt.ArrayLike) – Single value or array of wavelengths (in nm).

Returns

Permittivity tensor for position ‘z’ and wavelength ‘lbda’.

Return type

npt.NDArray

set_fraction_modulation(fraction_modulation)[source]

Sets function for variation of the mixture over the layer

Parameters

fraction_modulation (Callable[[float], float]) – Function to modify the fraction amount, takes float from 0 to 1 (top to bottom of layer), should return fraction at that level

elli.utils module

elli.utils.calc_pseudo_diel(rho, angle, output='eps')[source]

Calculates the pseudo dielectric function of a measurement from rho.

Parameters
  • rho (pandas.DataFrame) – Measurement DataFrame containing rho as complex number as column and wavelength as index

  • angle (float) – Angle of measurement in degree

  • output (str, optional) – Output format for dielectric function. ‘n’: refractive index, ‘eps’: Dielectic function as two-column pandas.DataFrame, ‘epsi’: Dielectric function as imaginary number. Defaults to ‘eps’.

Returns

Frame containing the pseudo dielectric function or refractive index.

Return type

pandas.DataFrame

elli.utils.calc_rho(psi_delta)[source]
Calculate rho from a Psi-Delta DataFrame.

The Psi-Delta DataFrame should be structured as follows:

index: Wavelength column ‘Ψ’: Psi from measurement column ‘Δ’: Delta from measurement

This format is as returned from SpectraRay.read_psi_delta_file(…).

Parameters

psi_delta (pandas.DataFrame) – DataFrame containing Psi+Delta Measurement data

Returns

Frame containing rho as an imaginary number.

Return type

pandas.DataFrame

elli.utils.get_qwp_thickness(material, lbda)[source]

Return the thickness of a material in nm for a quater wave plate at wavelength ‘lbda’.

Parameters
  • material (Material) – Material object of the quarter wave plate

  • lbda (float) – Wavelength (in nm) at which the quarter wave plate is calculated

Returns

Thickness (in nm) of quarter wave plate

Return type

float

Module contents