pwspy.utility.reflection.multilayerReflectanceEngine.Stack

class pwspy.utility.reflection.multilayerReflectanceEngine.Stack(wavelengths, elements=None)[source]

Bases: pwspy.utility.reflection.multilayerReflectanceEngine.StackBase

Represents a stack of 1d homogenous films. Reflectance for the two polarizations can be calculated for a range of numerical apertures (angles). Indices of refraction must be real (no absorption).

Parameters
  • wavelengths (Union[Number, ndarray]) – The wavelengths that calculation should operate over.

  • elements (Optional[List[Layer]]) – The initial layers to add to the stack.

addLayer(element)

Add a new Layer to the Stack

Parameters

element (Layer) – A new layer to add.

calculateReflectance(NAs)[source]

Given an array of numerical apertures this function returns the reflectance as a dictionary of 2d arrays. There is one 2d array for each of the two polarizations. the dimensions of the array is (wavelengths x NAs). The total reflectance can be calculated as the average reflectance of the two polarizations. Other ellipsometric parameters can also be calculated.

Parameters

NAs (ndarray) – The numerical apertures to calculate reflectance at.

Returns

A dictionary containing a reflectance array for each of the two polarizations. The polarization is the key to the dictionary. Each reflectance is a MxN array where M is the number of wavelengths and N is the number of NAs passed to this function.

circularIntegration(NAs)[source]

Given an array of NumericalApertures (usually from 0 to NAMax.) This function integrates the reflectance over a disc of Numerical Apertures (Just like in a microscope the Aperture plane is a disc shape, with higher NA being further from the center.) Ultimately the result of this integration should match the reflectance measured with the same NA.

Parameters

NAs (ndarray) – The numerical apertures to calculate reflectance at.

Return type

Series

Returns

A pandas Series with wavelengths as the index and reflectance as the value.

static interfaceMatrix(n1, n2, polarization, NAs)[source]

Returns a matrix representing a dieletric interface. n1 and n2 should be a pandas Series where the values are complex refractive index and the index of the Series is the associated wavelengths.

Parameters
  • n1 (Series) – The refractive indices on one side of the reflective interface

  • n2 (Series) – The refractive indices on the other side of the reflective interface

  • polarization (Polarization) – The polarization that should be used for the calculation

  • NAs (ndarray) – An array of the numerical aperture values. :todo: More details would be good

Return type

ndarray

Returns

A transfer matrix for the reflective interface

plot(NAs, polarization=None)[source]

Plot various graphs of reflectance vs NA. NAs should be an array of Numerical apertures to have the reflectance calculated for. polarization can be specified to view the reflectance of only one polarization.

static propagationMatrix(n, d, NAs)[source]

Returns a matrix representing the propagation of light for a distance of d. d and the wavelengths must use the same units.

Parameters
  • n (Series) – The refractive indices of the material

  • d (float) – The distance of propagation.

Return type

ndarray

Returns

A transfer matrix for propagation through a material.