legume.viz.bands

legume.viz.bands(gme, Q=False, Q_clip=10000000000.0, cone=True, conecolor='#eeeeee', ax=None, figsize=(4, 5), Q_cmap='viridis', markersize=6, markeredgecolor='w', markeredgewidth=1.5, show_symmetry=True, eV=False, a=None, k_units=False)

Plot photonic band structure from a GME or PWE simulation

Note

The bands must be solved for and stored in the GuidedModeExp or PlaneWaveExp object prior to calling this function.

Parameters:
  • gme (GuidedModeExp or PlaneWaveExp)

  • Q (bool, optional) – Whether each point should be colored according to the quality factor. Default is False.

  • Q_clip (float, optional) – The clipping (vmax) value for the quality factor colormap. Default is 1e10.

  • cone (bool , optional) – Whether the the light cone region of the band structure should be shaded. Default is True.

  • conecolor (str, optional) – Color of the light cone region. Default is ‘#eeeeee’ (light grey).

  • ax (matplotlib axis object, optional) – Matplotlib axis object for plotting. If not provided, a new figure and axis are automatically created.

  • figsize (Tuple, optional) – Figure size for created figure. Default is (4,5).

  • Q_cmap (str or matplotlib colormap object, optional) – Colormap used for the quality factor. Default is ‘viridis’.

  • markersize (float, optional) – Band marker size. Default is 6.

  • markeredgecolor (str, optional) – Band marker edge border color. Default is white.

  • markeredgewidth (float, optional) – Band marker edge border width. Default is 1.5.

  • show_symmetry (bool, optional) – Plot odd and even modes w.r.t. the kz plane of symmetry with different colours if gme.symmetry == ‘both’. Odd modes are blue, even modes are red. Note that this symmetry is not implemented for PlaneWaveExp class.

  • eV (bool, optional) – Plot the energy bands in [eV]. Default is False

  • a (optional) – Lattice constant in [m], this parameters is required if eV == True. Default is None

  • k_units (bool, optional) – Whether x-coordinates are calculated from wavevector increments and have physical meaning (if True), or they are simply linearly spaced points (if False). Use True in order to plot photonic bands with wavevectors that represent actual paths in the Brillouin zone. Default is False, for backwards compataibility.

Returns:

ax – Axis object for the plot.

Return type:

matplotlib axis object