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.DispersionLawSellmeier dispersion law equation.
- class elli.dispersions.DispersionDrudeEnergy(*coeffs)[source]
Bases:
elli.dispersions.DispersionLawDrude dispersion with energy paramters.
- class elli.dispersions.DispersionDrudeResistivity(*coeffs)[source]
Bases:
elli.dispersions.DispersionLawDrude dispersion with resistivity paramters.
- class elli.dispersions.DispersionGauss(eps_inf, *coeffs)[source]
Bases:
elli.dispersions.DispersionLawGauss 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
- class elli.dispersions.DispersionLaw[source]
Bases:
abc.ABCDispersion law (abstract class).
Functions provided for derived classes: * dielectricFunction(lbda) : returns dielectric constant for wavelength ‘lbda’
- getDielectric(lbda)[source]
Returns the dielectric constant for wavelength ‘lbda’ default unit (nm) in the convention ε1 + iε2.
- class elli.dispersions.DispersionLess(n)[source]
Bases:
elli.dispersions.DispersionLawConstant Dispersion law, therefor no dispersion.
- class elli.dispersions.DispersionLorentzEnergy(*coeffs)[source]
Bases:
elli.dispersions.DispersionLawLorentz dispersion law equation, with energy coefficients.
- class elli.dispersions.DispersionLorentzLambda(*coeffs)[source]
Bases:
elli.dispersions.DispersionLawLorentz dispersion law equation, with wavelength coefficients.
- class elli.dispersions.DispersionMgO(*coeffs)[source]
Bases:
elli.dispersions.DispersionLawAlternative form of the Sellmeier dispersion law equation
- class elli.dispersions.DispersionPoles(A_ir, A_uv, E_uv)[source]
Bases:
elli.dispersions.DispersionLawDisperion law for an UV and IR pole, i.e. Lorentz oscillators outside the fitting spectral range
- class elli.dispersions.DispersionSellmeier(*coeffs)[source]
Bases:
elli.dispersions.DispersionLawSellmeier dispersion law equation.
- class elli.dispersions.DispersionSum(*dispersions)[source]
Bases:
elli.dispersions.DispersionLawRepresentation for a sum of two dispersions
- class elli.dispersions.DispersionTable(lbda, n)[source]
Bases:
elli.dispersions.DispersionLawDispersion law specified by a table
- class elli.dispersions.DispersionTableEpsilon(lbda, epsilon)[source]
Bases:
elli.dispersions.DispersionLawDispersion law specified by a table
- class elli.dispersions.DispersionTanguy(A, d, gam, R, Eg, a, b)[source]
Bases:
elli.dispersions.DispersionLawFractional dimensional Tanguy model
- class elli.dispersions.DispersionTaucLorentz(*coeffs)[source]
Bases:
elli.dispersions.DispersionLawTauc-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)
elli.experiment module
- class elli.experiment.Experiment(structure, lbda, theta_i, vector=[1, 0, - 1, 0])[source]
Bases:
objectDescription of a virtual experiment to simulate the behavior of a structure.
- evaluate(solver=<class 'elli.solver4x4.Solver4x4'>, **solver_kwargs)[source]
Evaluates the experiment with the given solver.
- 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.SingleMaterialBiaxial material.
- class elli.materials.IsotropicMaterial(law)[source]
Bases:
elli.materials.SingleMaterialIsotropic material.
- class elli.materials.Material[source]
Bases:
abc.ABCBase class for materials (abstract class).
Method that should be implemented in derived classes: * get_tensor(lbda) : returns the permittivity tensor for wavelength ‘lbda’.
- class elli.materials.MaxwellGarnetEMA(host_material, guest_material, fraction)[source]
Bases:
elli.materials.MixtureMaterialMixture Material approximated with the Maxwell Garnet formula. It is valid for spherical inclusions with small volume fraction.
- class elli.materials.MixtureMaterial(host_material, guest_material, fraction)[source]
Bases:
elli.materials.MaterialAbstract Class for mixed materials
- fraction = None
- guest_material = None
- host_material = None
- class elli.materials.SingleMaterial[source]
Bases:
elli.materials.MaterialBase class for single materials (abstract class).
Method that should be implemented in derived classes: * get_tensor(lbda) : returns the permittivity tensor for wavelength ‘lbda’.
- law_x = None
- law_y = None
- law_z = None
- rotated = False
- rotation_matrix = None
- class elli.materials.UniaxialMaterial(law_o, law_e)[source]
Bases:
elli.materials.SingleMaterialUniaxial material.
- class elli.materials.VCAMaterial(host_material, guest_material, fraction)[source]
Bases:
elli.materials.MixtureMaterialMixture Material approximated with a simple virtual crystal like average.
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
- 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:
objectRecord 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.ABCSolver 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
- 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.SolverSolver 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
- 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
- property psi
- property rho
elli.solver4x4 module
- class elli.solver4x4.Propagator[source]
Bases:
abc.ABCPropagator 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.PropagatorPropagator 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.PropagatorPropagator 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.PropagatorPropagator 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.PropagatorPropagator 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.PropagatorPropagator 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.SolverSolver 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
- 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
elli.structure module
- class elli.structure.AbstractLayer[source]
Bases:
abc.ABCAbstract 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]]
- class elli.structure.InhomogeneousLayer(material, d)[source]
Bases:
elli.structure.LayerAbstract base class for inhomogeneous layers with varying properties in z-direction.
- 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]]
- class elli.structure.Layer(material, d)[source]
Bases:
elli.structure.AbstractLayerHomogeneous layer of dielectric material.
- 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]]
- class elli.structure.RepeatedLayers(layers, repetitions, before=0, after=0)[source]
Bases:
elli.structure.AbstractLayerRepeated structure of layers.
- 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
- class elli.structure.Structure(front, layers, back)[source]
Bases:
objectDescription of the whole structure.
Consists of: - front half-space (incident) - back half-space (exit) - layer succession
- 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
- 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
- class elli.structure.TwistedLayer(material, d, div, angle)[source]
Bases:
elli.structure.InhomogeneousLayerTwisted layer. The material gets rotated around the z axis.
- 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
- class elli.structure.VaryingMixtureLayer(material, d, div, fraction_modulation)[source]
Bases:
elli.structure.InhomogeneousLayerMixture layer, with varying fraction.
- 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
elli.utils module
- elli.utils.calcPseudoDiel(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
- 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