legume.GuidedModeExp

class legume.GuidedModeExp(phc, gmax=3.0, truncate_g='abs')

Main simulation class of the guided-mode expansion.

__init__(phc, gmax=3.0, truncate_g='abs')

Initialize the guided-mode expansion.

Parameters:
  • phc (PhotCryst) – Photonic crystal object to be simulated.

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

  • truncate_g ({'tbt', 'abs'}) – Truncation of the reciprocal lattice vectors, 'tbt' takes a parallelogram in reciprocal space, while 'abs' takes a circle.

Methods

__init__(phc[, gmax, truncate_g])

Initialize the guided-mode expansion.

compute_eps_inv([only_gmodes])

Construct the inverse FT matrices for the permittivity in each layer

compute_rad(kind[, minds])

Compute the radiation losses of the eigenmodes after the dispersion has been computed.

compute_rad_sp(kind[, minds])

Compute the radiation losses of the eigenmodes after the dispersion has been computed.

ft_field_xy(field, kind, mind, z)

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

get_eps_xy(z[, xgrid, ygrid, Nx, Ny])

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.

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

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

get_field_xz(field, kind, mind, y[, xgrid, ...])

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

get_field_yz(field, kind, mind, x[, ygrid, ...])

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

run([kpoints, angles])

Compute the eigenmodes of the photonic crystal structure.

run_im()

Compute the radiative rates associated to all the eigenmodes that were computed during GuidedModeExp.run().

set_run_options([gmode_compute, gmode_inds, ...])

Set multiple options for the guided-mode expansion.

Attributes

eigvecs

Eigenvectors of the eigenmodes computed by the guided-mode expansion.

freqs

Real part of the frequencies of the eigenmodes computed by the guided-mode expansion.

freqs_im

Imaginary part of the frequencies of the eigenmodes computed by the guided-mode 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.

kz_symms

Symmetry of the eigenmodes computed by the guided-mode expansion w.r.t.

rad_coup

Coupling to TE and TM radiative modes in the claddings.

rad_gvec

Reciprocal lattice vectors corresponding to the radiation emission direction of the coupling constants stored in GuidedModeExp.rad_coup.

unbalance_sp

Unbalance between the two addends in the summation of the imaginary part of the energy.