elli package

Subpackages

Submodules

elli.dispersions module

class elli.dispersions.DispersionCauchy(n0=1.5, n1=0, n2=0, k0=0, k1=0, k2=0)[source]

Bases: elli.dispersions.DispersionLaw

Sellmeier dispersion law equation.

Creates a Cauchy dispersion law.

Cauchy coefficients: n0, n1, n2, k0, k1, k2 coefficients defined for λ in nm

n(λ) = n0 + 100 * n1/λ² + 10e7 n2/λ^4 k(λ) = k0 + 100 * k1/λ² + 10e7 k2/λ^4

dielectricFunction(lbda)[source]
class elli.dispersions.DispersionDrudeEnergy(*coeffs)[source]

Bases: elli.dispersions.DispersionLaw

Drude dispersion with energy paramters.

Creates a Drude model.

Drude coefficients ϵinf, A, Γ ϵinf : epsilon infinity A : Amplitude of Drude oscillator (eV^2) Γ : Broadening of Drude oscillator (eV)

dielectricFunction(lbda)[source]
class elli.dispersions.DispersionDrudeResistivity(*coeffs)[source]

Bases: elli.dispersions.DispersionLaw

Drude dispersion with resistivity paramters.

Creates a Drude model.

Drude coefficients ϵinf, ρopt, τ ϵinf : epsilon infinity ρopt : optical resistivity (Ω-cm) τ : Mean scattering time (s)

dielectricFunction(lbda)[source]
class elli.dispersions.DispersionGauss(eps_inf, *coeffs)[source]

Bases: elli.dispersions.DispersionLaw

Gauss model with energy parameters. References: D. De Sousa Meneses, M. Malki, P. Echegut, J. Non-Cryst. Solids 351, 769-776 (2006) K.-E. Peiponen, E.M. Vartiainen, Phys. Rev. B. 44, 8301 (1991) H. Fujiwara, R. W. Collins, Spectroscopic Ellipsometry for Photovoltaics Volume 1, Springer International Publishing AG, 2018, p. 137

Creates a Gauss model

Gauss coefficients ϵinf, [A1, E1, Γ1], [A2, E2, Γ2],… ϵinf : infinity dielectric constant Ai : Amplitude of ith Gaussian Ei : Central energy of ith Gaussian (eV) Γ1 : Broadening of ith Gaussian (eV)

dielectricFunction(lbda)[source]
class elli.dispersions.DispersionHighEnergyBands(A, E_xsi)[source]

Bases: elli.dispersions.DispersionLaw

dielectricFunction(lbda)[source]
class elli.dispersions.DispersionLaw[source]

Bases: abc.ABC

Dispersion law (abstract class).

Functions provided for derived classes: * dielectricFunction(lbda) : returns dielectric constant for wavelength ‘lbda’

abstract dielectricFunction(lbda)[source]
getDielectric(lbda)[source]

Returns the dielectric constant for wavelength ‘lbda’ default unit (nm) in the convention ε1 + iε2.

getDielectric_df(lbda=None, conjugate=False)[source]
getRefractiveIndex(lbda)[source]

Returns the refractive index for wavelength ‘lbda’ default unit (nm) in the convention n + ik.

getRefractiveIndex_df(lbda=None, conjugate=False)[source]
class elli.dispersions.DispersionLess(n)[source]

Bases: elli.dispersions.DispersionLaw

Constant Dispersion law, therefor no dispersion.

Create a dispersion law with a constant refraction index.

‘n’Refractive index value (can be complex)

(n” > 0 for an absorbing material)

dielectricFunction(lbda)[source]
class elli.dispersions.DispersionLorentzEnergy(*coeffs)[source]

Bases: elli.dispersions.DispersionLaw

Lorentz dispersion law equation, with energy coefficients.

Creates a Lorentz dispersion law, with energy coefficients.

Lorentz coefficients [A1, E1, Γ1], [A2, E2, Γ2],…

Ai : coefficient Ei : resonance Energy (eV) Γi :

ε(E) = 1 + Σi Ai /(E²-Ei²+j Γi E)

dielectricFunction(lbda)[source]
class elli.dispersions.DispersionLorentzLambda(*coeffs)[source]

Bases: elli.dispersions.DispersionLaw

Lorentz dispersion law equation, with wavelength coefficients.

Creates a Lorentz dispersion law, with wavelength coefficients.

Lorentz coefficients [A1, λ1, ζ1], [A2, λ2, ζ2],…

Bi : coefficient λi : resonance wavelength (nm) ζi :

ε(λ) = 1 + Σi Ai × λ² / (λ² - λi² + j ζi λ)

dielectricFunction(lbda)[source]
class elli.dispersions.DispersionMgO(*coeffs)[source]

Bases: elli.dispersions.DispersionLaw

Alternative form of the Sellmeier dispersion law equation

dielectricFunction(lbda)[source]
class elli.dispersions.DispersionPoles(A_ir, A_uv, E_uv)[source]

Bases: elli.dispersions.DispersionLaw

Disperion law for an UV and IR pole, i.e. Lorentz oscillators outside the fitting spectral range

dielectricFunction(lbda)[source]
class elli.dispersions.DispersionSellmeier(*coeffs)[source]

Bases: elli.dispersions.DispersionLaw

Sellmeier dispersion law equation.

Creates a Sellmeier dispersion law.

Sellmeier coefficients [A1, B1], [A1, B1],…

Ai : coefficient for n² contribution Bi : resonance wavelength (µm^-2)

ε(λ) = 1 + Σi Ai × λ²/(λ² - Bi)

dielectricFunction(lbda)[source]
class elli.dispersions.DispersionSum(*dispersions)[source]

Bases: elli.dispersions.DispersionLaw

Representation for a sum of two dispersions

dielectricFunction(lbda)[source]
class elli.dispersions.DispersionTable(lbda, n)[source]

Bases: elli.dispersions.DispersionLaw

Dispersion law specified by a table

Create a dispersion law from a refraction index list.

‘lbda’ : Wavelength list (in nm) ‘n’ : Refractive index values (can be complex)

(n” > 0 for an absorbing material)

dielectricFunction(lbda)[source]
class elli.dispersions.DispersionTableEpsilon(lbda, epsilon)[source]

Bases: elli.dispersions.DispersionLaw

Dispersion law specified by a table

Create a dispersion law from a dielectric constant list.

‘lbda’ : Tuple with (Wavelength list, unit), or Wavelength list (in nm) ‘ε’ : Refractive index values (can be complex)

dielectricFunction(lbda)[source]
class elli.dispersions.DispersionTanguy(A, d, gam, R, Eg, a, b)[source]

Bases: elli.dispersions.DispersionLaw

Fractional dimensional Tanguy model

Creates a Tanguy dispersion model

Tanguy coefficients A, d, gamma, R, Eg, a, b

A : Amplitude (eV) d : dimensionality 1 < d <= 3 gam: excitonic broadening (eV) R : excitonic binding energy (eV²) Eg : optical band gap energy (eV) a : Sellmeier coefficient for background dielectric constant (eV²) b : Sellmeier coefficient for background dielectric constant (eV²)

dielectricFunction(lbda)[source]
static g(xsi, d)[source]
static xsi(z, R, Eg)[source]
class elli.dispersions.DispersionTaucLorentz(*coeffs)[source]

Bases: elli.dispersions.DispersionLaw

Tauc-Lorentz model by Jellison and Modine Literature:

G.E. Jellision and F.A. Modine, Appl. Phys. Lett. 69 (3), 371-374 (1996) Erratum, G.E. Jellison and F.A. Modine, Appl. Phys. Lett 69 (14), 2137 (1996) H. Chen, W.Z. Shen, Eur. Phys. J. B. 43, 503-507 (2005)

Creates a Tauc-Lorentz model.

Tauc-Lorentz coefficients Eg, eps_inf, [A1, E1, C1], [A2, E2, C2],…

Eg : optical band gap energy (eV) eps_inf : epsilon infinity Ai : Strength of ith absorption (eV). Typically 10 < Ai < 200 Ei : lorentz resonance energy (eV). Always Eg < Ei Ci : lorentz broadening (eV). Typically 0 < Ci < 10

dielectricFunction(lbda)[source]
static eps2(E, Eg, Ai, Ei, Ci)[source]

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.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 dipsersion 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(solver)[source]

Bases: object

Record of a simulation result.

property R
property Rc
property T
property Tc
property delta
property delta_matrix
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

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.

property R
property Rc
property T
property Tc
abstract calculate()[source]
property delta
property delta_matrix
property jones_matrix_r
property jones_matrix_rc
property jones_matrix_t
property jones_matrix_tc
jones_vector = None
lbda = None
property mueller_matrix
permittivity_profile = None
property psi
property psi_matrix
property rho
property rho_matrix
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).

property R
calculate()[source]

Calculates the transfer matrix for the given material stack

property delta
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]
property psi
property rho

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.

property R
property Rc
property T
property Tc
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

property delta
property delta_matrix
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

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
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