legume.GuidedModeExp.get_field_xy

GuidedModeExp.get_field_xy(field, kind, mind, z, xgrid=None, ygrid=None, component='xyz', Nx=100, Ny=100)

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

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.
  • z (float) – Position of the xy-plane.
  • xgrid (None, optional) – None or a 1D np.array defining a grid in x.
  • ygrid (None, optional) – None or a 1D np.array defining a grid in y.
  • component (str, optional) – A string containing ‘x’, ‘y’, and/or ‘z’
  • Nx (int, optional) – If xgrid==None, a grid of Nx points in the elementary cell is created.
  • Ny (int, optional) – If ygrid==None, a grid of Ny points in the elementary cell is created.
Returns:

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