legume.PlaneWaveExp.get_field_xy¶
-
PlaneWaveExp.
get_field_xy
(field, kind, mind, z=0, 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 PlaneWaveExp.kpoints[:, kind] is computed.
- mind (int) – The field of the mind mode at that kpoint is computed.
- z (float) – Position of the xy-plane. This doesn’t matter for the PWE, but is added for consistency with the GME definitions.
- component (str, optional) – A string containing ‘x’, ‘y’, and/or ‘z’
- Nx (int, optional) – A grid of Nx points in the elementary cell is created.
- Ny (int, optional) – 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 constructed grid in x.
- ygrid (np.ndarray) – The constructed grid in y.