legume.GuidedModeExp.get_field_xz¶
-
GuidedModeExp.
get_field_xz
(field, kind, mind, y, xgrid=None, zgrid=None, component='xyz', Nx=100, Nz=100, dist=1.0)¶ Compute the ‘H’, ‘D’ or ‘E’ field components in the xz-plane at position y.
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.
- y (float) – Position of the xz-plane.
- xgrid (None, optional) – None or a 1D np.array defining a grid in x.
- 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’
- Nx (int, optional) – If xgrid==None, a grid of Nx points in the elementary cell is created.
- Nz (int, optional) – If zgrid==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’.
- xgrid (np.ndarray) – The input or constructed grid in x.
- zgrid (np.ndarray) – The input or constructed grid in z.