rcwa API¶
The main user-facing classes: Solver
, Layer
, LayerStack
, Source
, Material
, Crystal
, and Plotter
. The Layer
class is used to set up the individual simulation layers and define their properties, including thickness, material properties, and crystal structures (if applicable). The Material
class can be passed into the Layer
class to define a layer whose material properties are dependent on refractive index. The Crystal
class is used to define layers which are periodic in x and y, and is also passed into the Layer
class. Once all individual layers are constructed, they are used to create a LayerStack
, which contains information about which region is considered the “incident” region and which is the “transmission” region (both are semi-infinite).
The Source
class is used to define the excitation source - the wavelength, polarization, and incident angle.
Once the user has created a Source
and LayerStack
class, these are passed into the Solver
class, which then runs the simulation, and makes the results available as a dictionary Solver.results
.
- class rcwa.Solver(layerStack, source, numberHarmonics=(1, 1))¶
Main class that invokes all methods necessary to solve an RCWA/TMM simulation
- Parameters
layerStack – layerStack: Stack of layers to simulate
source – Source object which includes wavelength and direction information
numberHarmonics – The number of harmonics in x, y to simulate (number of Fourier components). Defaults to (1, 1). Should be a 2-dimensional tuple.
- Solve(wavelengths=array([], dtype=float64))¶
Solves the simulation or performs a simulation sweep of the desired parameters
- Parameters
wavelengths – list of wavelengths to simulate (can be a single number)
- class rcwa.Layer(er=1.0, ur=1.0, L=0.0, n=None, crystal=None, numberHarmonics=None, material=None, source=None)¶
Class for defining a single layer of a layer stack used in a simulation
- Parameters
er – Permittivity of the layer
ur – Permeability of the layer
L – Thickness of the layer
n – Refractive index of the layer
crystal – Crystal object if the layer is periodic in x/y
material – Material object containing the material’s permittivity and permeability as a function of wavelength/angle.
- class rcwa.LayerStack(*layers)¶
Class that defines overall geometry in terms of a stack of layers
- Parameters
layers – Layer objects, starting with the bottom-most layer (substrate) and ending with the top-most region (where the source is incident from)
- class rcwa.Source(wavelength=6.283185307179586, theta=0, phi=0, pTEM=[1, 1], layer=Layer with er: 1 ur: 1 L: 0.0 n: 1.0 crystal: None)¶
Class for defining monochromatic excitation source
- Parameters
wavelength – The wavelength (in microns, or your preferred length unit due to the scale-invariance of Maxwell’s equations.
theta – Angle with respect to the vector normal to the layer stack, in radians
phi – Rotation angle amount the vector normal to the layer stack
pTEM – Polarization vector for TE/TM polarization fraction (can be complex)
layer – Layer source is located in
- class rcwa.Crystal(permittivityCellData=1, permeabilityCellData=1, *latticeVectors)¶
Class used for defining periodic structures in x and y
- Parameters
permittivityCellData – 2D numpy array of permittivity values
permeabilityCellData – 2D numpy array of permeability values
latticeVectors – Real-space lattice vectors
- class rcwa.Material(name=None, er=1, ur=1, n=None, database_path=None, filename=None, source=None)¶
Material class for defining materials permittivity / permeability / refractive index as a function of wavelength / angle.
- Parameters
name – Material name to be looked up in database (i.e. Si)
er – Complex-valued numerical permittivity value or function of wavelength
ur – Complex-valued numerical permeability value or function of wavelength
n – Complex-valued refractive index of material. Overrides er / ur
source – Excitation source to link to material (mandatory for dispersive materials)
filename – File containing n/k data for the material in question
database_path – Raw file path within database
- class rcwa.utils.Plotter¶
- static plotEllipsometrySpectra(resultsList)¶
Plots the ellipsometry spectra from simulation results
- Parameters
resultsList – List of results from simulation output
- Returns fig, ax
Figure and axes objects for plot
- static plotRTEMSpectra(resultsList)¶
Plots the TE/TM reflectance from simulation results
- Parameters
resultsList – List of results from simulation output
- Returns fig, ax
Figure and axes objects for plot
- static plotRTSpectra(resultsList)¶
Plots the reflectance, transmittance, and conservation spectra from a set of simulatiotn results
- Parameters
resultsList – List of results from simulation output
- Returns fig, ax
Figure and axes objects for plot