legume.PlaneWaveExp

class legume.PlaneWaveExp(layer, gmax=3.0, eps_eff=None)

Main simulation class of the plane-wave expansion.

__init__(layer, gmax=3.0, eps_eff=None)

Initialize the plane-wave expansion.

Parameters:
  • layer (Layer) – Layer defining the 2D structure.

  • gmax (float, optional) – Maximum reciprocal lattice wave-vector length in units of 2pi/a.

  • eps_eff (float, optional) – Effective background epsilon; if None, take layer.eps_b.

Methods

__init__(layer[, gmax, eps_eff])

Initialize the plane-wave expansion.

ft_field_xy(field, kind, mind)

Compute the 'H', 'D' or 'E' field Fourier components in the xy-plane.

get_eps_xy([Nx, Ny, z])

Get the xy-plane permittivity of the layer as computed from an inverse Fourier transform with the PWE reciprocal lattice vectors.

get_field_xy(field, kind, mind[, z, ...])

Compute the 'H', 'D' or 'E' field components in the xy-plane at position z.

run([kpoints, pol, numeig])

Run the simulation.

Attributes

eigvecs

Eigenvectors of the eigenmodes computed by the plane-wave expansion.

freqs

Frequencies of the eigenmodes computed by the plane-wave expansion.

gvec

Numpy array of shape (2, Ng) with the [gx, gy] coordinates of the reciprocal lattice vectors over which the simulation is run.

kpoints

Numpy array of shape (2, Nk) with the [kx, ky] coordinates of the k-vectors over which the simulation is run.