Experiment

The experiment class defines the external conditions of the sample.

It requires a Structure to evaluate and includes the information about the incident light beam:

  • the wavelengths \(\lambda\)

  • the incidence angle \(\theta_\text{i}\)

  • and the polarization, which can be given by a Jones or Stokes vector

The evaluate method can be called, to start the calculation of the optical properties. To choose a Solver to be used in the calculation, the solver class is provided as an argument and an object will be created automatically.

The experiment class is only needed in special cases an can be skipped by calling elli.structure.Structure.evaluate().

class elli.experiment.Experiment(structure, lbda, theta_i, vector=None)[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 diagonal polarization ([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