legume.GuidedModeExp.get_field_yz

GuidedModeExp.get_field_yz(field, kind, mind, x, ygrid=None, zgrid=None, component='xyz', Ny=100, Nz=100, dist=1.0)

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

Parameters:
  • field ({'H', 'D', 'E'}) – The field to be computed.
  • kind (int) – The field of the mode at GuidedModeExp.kpoints[:, kind] is computed.
  • mind (int) – The field of the mind mode at that kpoint is computed.
  • x (float) – Position of the yz-plane.
  • ygrid (None, optional) – None or a 1D np.array defining a grid in y.
  • zgrid (None, optional) – None or a 1D np.array defining a grid in z.
  • component (str, optional) – A string containing ‘x’, ‘y’, and/or ‘z’
  • Ny (int, optional) – If xgrid==None, a grid of Ny points in the elementary cell is created.
  • Nz (int, optional) – If ygrid==None, a grid of Nz points in the elementary cell is created.
Returns:

  • fi (dict) – A dictionary with the requested components, ‘x’, ‘y’, and/or ‘z’.
  • ygrid (np.ndarray) – The input or constructed grid in y.
  • zgrid (np.ndarray) – The input or constructed grid in z.