legume.GuidedModeExp.run
- GuidedModeExp.run(kpoints=array([[0], [0]]), angles=array([], dtype=float64), **kwargs)
Compute the eigenmodes of the photonic crystal structure.
The guided-mode expansion proceeds as follows:
Compute the inverse matrix of the fourier transform of the permittivity in every phc layer.
Iterate over the k points:
Compute the guided modes over all the (g + k) points.
Compute the Hermitian matrix for diagonalization.
Compute the real part of the eigenvalues, stored in
GuidedModeExp.freqs, and the corresponding eigenvectors, stored inGuidedModeExp.eigvecs.If compute_im=True (as is default), run
GuidedModeExp.run_im(). If kz_symmetry = ‘odd’, ‘even’ or ‘both’ calculates symmetries for each k, and imaginary part of frequencies of both polarizations if kz_symmetry = odd’ or ‘even’ calculates imaginary part of ‘odd’ or ‘even’ modes.- Parameters:
kpoints (np.ndarray, optional) – numpy array of shape (2, :) with the [kx, ky] coordinates of the k-vectors over which the simulation is run.
angles (np.ndarray, optional) – This is needed only in case symmetry is differnet from None. Numpy array with direction angle in kx-ky plane of kpoints.
**kwargs – All the keyword arguments that can be passed here, as well as their default values, are defined in
GuidedModeExp.set_run_options().