legume.viz.eps_xz

legume.viz.eps_xz(phc, y=0, Nx=100, Nz=50, ax=None, clim=None, cbar=False, cmap='Greys', plot=True)

Plot permittivity cross section of a photonic crystal in an xz plane

Parameters:
  • phc (PhotCryst) –
  • y (float, optional) – The y-coordinate of the xz plane. Default is 0.
  • Nx (int, optional) – Number of sample points to use in x-direction. Default is 100.
  • Nz (int, optional) – Number of sample points to use in z-direction. Default is 50.
  • ax (int, optional) – Matplotlib axis object to use for plot.
  • clim (List[float], optional) – Matplotlib color limit to use for plot. Default is None.
  • cbar (bool, optional) – Whether or not a colorbar should be added to the plot. Default is False.
  • cmap (bool, optional) – Matplotlib colormap to use for plot Default is ‘Greys’.
  • plot (bool, optional) – Whether or not the a plot should be generated. Useful for cases where only the array values are needed, e.g. for logging during optimization. Default is True.
Returns:

eps_r – Array containing permittivity values

Return type:

np.ndarray