legume.PhotCryst

class legume.PhotCryst(lattice, eps_l: float = 1, eps_u: float = 1)

Class for a photonic crystal which can contain a number of layers.

__init__(lattice, eps_l: float = 1, eps_u: float = 1)

Initialize a photonic crystal.

Parameters:
  • lattice (Lattice) – A lattice defining the 2D periodicity.
  • eps_l (float, optional) – Permittivity of the lower cladding.
  • eps_u (float, optional) – Permittivity of the upper cladding.

Methods

__init__(lattice, eps_l, eps_u) Initialize a photonic crystal.
add_layer(d, eps_b, layer_type) Add a layer to the photonic crystal, on top of all currently existing layers.
add_shape(shapes[, layer, cladding]) Add a list of shapes to a given layer.
get_eps(points) Compute the permittivity of the PhC at a set of points.
get_eps_bounds() Returns the minimum and maximum permittivity of the structure.
z_grid([Nz, dist]) Define a z-grid for visualization purposes once some layers have been added.