tidy3d.EMESimulationData#

class EMESimulationData[source]#

Bases: AbstractYeeGridSimulationData

Data associated with an EME simulation.

Parameters:
  • attrs (dict = {}) – Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields, attrs are mutable. For example, the following is allowed for setting an attr obj.attrs['foo'] = bar. Also note that Tidy3D` will raise a TypeError if attrs contain objects that can not be serialized. One can check if attrs are serializable by calling obj.json().

  • simulation (EMESimulation) – EME simulation associated with this data.

  • data (Tuple[Annotated[Union[tidy3d.components.eme.data.monitor_data.EMEModeSolverData, tidy3d.components.eme.data.monitor_data.EMEFieldData, tidy3d.components.eme.data.monitor_data.EMECoefficientData, tidy3d.components.data.monitor_data.ModeSolverData], FieldInfo(default=PydanticUndefined, discriminator='type', extra={})], ...]) – List of EME monitor data associated with the monitors of the original EMESimulation.

  • log (Optional[str] = None) – A string containing the log information from the simulation run.

  • smatrix (EMESMatrixDataset) – Scattering matrix of the EME simulation.

  • port_modes (Optional[EMEModeSolverData]) – Modes associated with the two ports of the EME device. The scattering matrix is expressed in this basis.

Attributes

port_modes_list_sweep

Port modes as a list of tuples (port_modes_1, port_modes_2).

port_modes_tuple

Port modes as a tuple (port_modes_1, port_modes_2).

data

log

Custom logger to avoid the complexities of the logging module

attrs

Methods

field_in_basis(field[, modes, port_index])

Express the electromagnetic field in the provided basis.

smatrix_in_basis([modes1, modes2])

Express the scattering matrix in the provided basis.

Inherited Common Usage

simulation#
data#
smatrix#
port_modes#
property port_modes_tuple#

Port modes as a tuple (port_modes_1, port_modes_2).

property port_modes_list_sweep#

Port modes as a list of tuples (port_modes_1, port_modes_2). There is one entry for every sweep index if the port modes vary with sweep index.

smatrix_in_basis(modes1=None, modes2=None)[source]#

Express the scattering matrix in the provided basis. Change of basis is done by computing overlaps between provided modes and port modes.

Parameters:
  • modes1 (Union[FieldData, ModeData]) – New modal basis for port 1. If None, use port_modes.

  • modes2 (Union[FieldData, ModeData]) – New modal basis for port 2. If None, use port_modes.

Returns:

The scattering matrix of the EME simulation, but expressed in the basis of the provided modes, rather than in the basis of port_modes used in computation.

Return type:

EMESMatrixDataset

field_in_basis(field, modes=None, port_index=0)[source]#

Express the electromagnetic field in the provided basis. Change of basis is done by computing overlaps between provided modes and port modes.

Parameters:
  • field (EMEFieldData) – EME field to express in new basis.

  • modes (Union[FieldData, ModeData]) – New modal basis. If None, use port_modes.

  • port_index (Literal[0, 1]) – Port to excite.

Returns:

The propagated electromagnetic fied expressed in the basis of the provided modes, rather than in the basis of port_modes used in computation.

Return type:

EMEFieldData

__hash__()#

Hash method.