tidy3d.EMEFieldDataset#

class EMEFieldDataset[source]#

Bases: ElectromagneticFieldDataset

Dataset storing scalar components of E and H fields from EME propagation.

Parameters:
  • Ex (Optional[EMEScalarFieldDataArray] = None) – Spatial distribution of the x-component of the electric field of the mode.

  • Ey (Optional[EMEScalarFieldDataArray] = None) – Spatial distribution of the y-component of the electric field of the mode.

  • Ez (Optional[EMEScalarFieldDataArray] = None) – Spatial distribution of the z-component of the electric field of the mode.

  • Hx (Optional[EMEScalarFieldDataArray] = None) – Spatial distribution of the x-component of the magnetic field of the mode.

  • Hy (Optional[EMEScalarFieldDataArray] = None) – Spatial distribution of the y-component of the magnetic field of the mode.

  • Hz (Optional[EMEScalarFieldDataArray] = None) – Spatial distribution of the z-component of the magnetic field of the mode.

Notes

Each field component is an EMEScalarFieldDataArray with coordinates (x, y, z, f, sweep_index, eme_port_index, mode_index), where eme_port_index indicates which port is excited and mode_index indicates which mode at that port is excited.

Example

>>> from tidy3d import EMEScalarFieldDataArray
>>> x = [0, 1]
>>> y = [0, 1, 2]
>>> z = [0]
>>> f = [2e14]
>>> sweep_index = [0]
>>> eme_port_index = [0, 1]
>>> mode_index = [0, 1]
>>> coords = dict(
...     x=x, y=y, z=z, f=f, sweep_index=sweep_index,
...     eme_port_index=eme_port_index, mode_index=mode_index,
... )
>>> field = EMEScalarFieldDataArray((1+1j) * np.random.random((2,3,1,1,1,2,2)), coords=coords)
>>> data = EMEFieldDataset(Ex=field, Hy=field)

Attributes

Ex#
Ey#
Ez#
Hx#
Hy#
Hz#