API Reference
This page provides an auto-generated summary of legume’s API.
legume
set_backend(name)Set the backend for the simulations.
set_print_backend(name)Set the print backend for legume.
GuidedModeExp
Creating a simulation
|
Main simulation class of the guided-mode expansion. |
Attributes
Real part of the frequencies of the eigenmodes computed by the guided-mode expansion. |
|
Imaginary part of the frequencies of the eigenmodes computed by the guided-mode expansion. |
|
Eigenvectors of the eigenmodes computed by the guided-mode expansion. |
|
Numpy array of shape (2, Nk) with the [kx, ky] coordinates of the k-vectors over which the simulation is run. |
|
Numpy array of shape (2, Ng) with the [gx, gy] coordinates of the reciprocal lattice vectors over which the simulation is run. |
|
Coupling to TE and TM radiative modes in the claddings. |
|
Reciprocal lattice vectors corresponding to the radiation emission direction of the coupling constants stored in |
|
Unbalance between the two addends in the summation of the imaginary part of the energy. |
Methods
|
Compute the eigenmodes of the photonic crystal structure. |
Compute the radiative rates associated to all the eigenmodes that were computed during |
|
|
Compute the radiation losses of the eigenmodes after the dispersion has been computed. |
|
Compute the radiation losses of the eigenmodes after the dispersion has been computed. |
|
Get the xy-plane permittivity of the PhC at a given z as computed from an inverse Fourier transform with the GME reciprocal lattice vectors. |
|
Compute the 'H', 'D' or 'E' field Fourier components in the xy-plane at position z. |
|
Compute the 'H', 'D' or 'E' field components in the xy-plane at position z. |
|
Compute the 'H', 'D' or 'E' field components in the xz-plane at position y. |
|
Compute the 'H', 'D' or 'E' field components in the yz-plane at position x. |
Set multiple options for the guided-mode expansion. |
PlaneWaveExp
Creating a simulation
|
Main simulation class of the plane-wave expansion. |
Attributes
Frequencies of the eigenmodes computed by the plane-wave expansion. |
|
Eigenvectors of the eigenmodes computed by the plane-wave expansion. |
|
Numpy array of shape (2, Nk) with the [kx, ky] coordinates of the k-vectors over which the simulation is run. |
|
Numpy array of shape (2, Ng) with the [gx, gy] coordinates of the reciprocal lattice vectors over which the simulation is run. |
Methods
|
Run the simulation. |
|
Get the xy-plane permittivity of the layer as computed from an inverse Fourier transform with the PWE reciprocal lattice vectors. |
|
Compute the 'H', 'D' or 'E' field Fourier components in the xy-plane. |
|
Compute the 'H', 'D' or 'E' field components in the xy-plane at position z. |
ExcitonSchroedEq
Creating a simulation
|
Main simulation class of the excitonic Schroedinger equation. |
Attributes
Energies of the eigenmodes computed by the Schroedinger equation. |
|
Eigenvectors of the eigenmodes computed by the by the Schroedinger equation. |
|
Numpy array of shape (2, Nk) with the [kx, ky] coordinates of the k-vectors over which the simulation is run. |
|
Numpy array of shape (2, Ng) with the [gx, gy] coordinates of the reciprocal lattice vectors over which the simulation is run. |
Methods
|
Run the simulation. |
|
Get the xy-plane potential of the layer as computed from an inverse Fourier transform with the Schr Eq. |
|
Compute the wavefunction Fourier components in the xy-plane |
|
Compute the wavefunction in the xy-plane. |
HopfieldPol
Creating a simulation
|
Main simulation class of the generalized Hopfield matrix method. |
Attributes
Energies of the eigenmodes computed by the Hopfield matrix diagonalisation. |
|
Imaginary part of the frequencies of the eigenmodes computed by the Hopfield matrix diagonalisation. |
|
Eigenvectors of the eigenmodes computed by the by the Hopfield matrix diagonalisation. |
|
Excitonic fractions of the polaritonic eigenmodes. |
|
Photonic fractions of the polaritonic eigenmodes. |
|
Numpy array of shape (2, Nk) with the [kx, ky] coordinates of the k-vectors over which the simulation is run. |
|
Numpy array of shape (2, Ng) with the [gx, gy] coordinates of the reciprocal lattice vectors over which the simulation is run. |
Methods
|
Compute the eigenmodes of the photonic crystal taking into account light-matter interaction. |
Photonic crystal
|
Class for constructing a Bravais lattice |
|
Make a path in the Brillouin zone. |
|
Class for a photonic crystal which can contain a number of layers. |
|
Add a layer to the photonic crystal, on top of all currently existing layers. |
|
Add an active layer to in the photonic crystal. |
|
Class for a single layer in the potentially multi-layer PhC. |
|
Layer with permittivity defined by Shape objects |
Geometry
|
Circle shape |
|
Ellipse shape |
|
Ring shape |
|
Polygon shape |
|
Square shape |
|
Hexagon shape |
|
Fourier coefficinets of the polar coordinates |
Visualization
|
Plot photonic band structure from a GME or PWE simulation |
|
Plot polaritonic band structure from a polaritonic simulation |
|
Plot permittivity for all cross sections of a photonic crystal |
|
Plot all shapes of Layer |
|
Plot permittivity cross section of a photonic crystal in an xz plane |
|
Plot permittivity cross section of a photonic crystal in an xy plane |
|
Plot permittivity cross section of a photonic crystal in an yz plane |
|
Plot a permittivity cross section computed from an inverse FT |
|
Plot a potentail cross section computed from an inverse FT |
|
Plot the reciprocal lattice of a GME, PWE, ESE or HP object |
|
Visualize mode fields over a 2D slice in x, y, or z |
|
Visualize wafeunction over a 2D slice in xy plane |
|
Calculates x-axis coordinates (wavevector axis) for photonic and polaritonic bands plotting. |
GDS
|
Export a GDS file for all layers of a photonic crystal |
|
Traces a rasterization projected onto a lattice to generate a GDS file |