tidy3d.EMEModeSolverMonitor#

class EMEModeSolverMonitor[source]#

Bases: EMEMonitor

EME mode solver monitor. Records EME modes computed in planes intersecting the monitor geometry.

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().

  • center (Union[tuple[Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box], Union[float, autograd.tracer.Box]], Box] = (0.0, 0.0, 0.0)) – [units = um]. Center of object in x, y, and z.

  • size (Union[tuple[Union[pydantic.v1.types.NonNegativeFloat, autograd.tracer.Box], Union[pydantic.v1.types.NonNegativeFloat, autograd.tracer.Box], Union[pydantic.v1.types.NonNegativeFloat, autograd.tracer.Box]], Box]) – [units = um]. Size in x, y, and z directions.

  • name (ConstrainedStrValue) – Unique name for monitor.

  • freqs (Union[Tuple[float, ...], ArrayLike[dtype=float, ndim=1], NoneType] = None) – Frequencies at which the monitor will record. Must be a subset of the simulation β€˜freqs’. A value of β€˜None’ will record at all simulation β€˜freqs’.

  • num_modes (Optional[NonNegativeInt] = None) – Maximum number of modes for the monitor to record. Cannot exceed the greatest number of modes in any EME cell. A value of β€˜None’ will record all modes.

  • num_sweep (Optional[NonNegativeInt] = 1) – Number of sweep indices for the monitor to record. Cannot exceed the number of sweep indices for the simulation. If the sweep does not change the monitor data, the sweep index will be omitted. A value of β€˜None’ will record all sweep indices.

  • interval_space (Tuple[Literal[1], Literal[1], Literal[1]] = (1, 1, 1)) – Note: not yet supported. Number of grid step intervals between monitor recordings. If equal to 1, there will be no downsampling. If greater than 1, the step will be applied, but the first and last point of the monitor grid are always included. Note: the interval in the propagation direction is not used. Note: this is not yet supported.

  • eme_cell_interval_space (PositiveInt = 1) – Number of eme cells between monitor recordings. If equal to 1, there will be no downsampling. If greater than 1, the step will be applied, but the first and last cells are always included. Not used in all monitors. Not all monitors support values different from 1.

  • colocate (bool = True) – Toggle whether fields should be colocated to grid cell boundaries (i.e. primal grid nodes). Default (False) is used internally in EME propagation.

  • normalize (bool = True) – Whether to normalize the EME modes to unity flux.

  • keep_invalid_modes (bool = False) – Whether to store modes containing nan values and modes which are exponentially increasing in the propagation direction.

Note

This is different than a ModeSolverMonitor, which computes modes within its planar geometry. In contrast, this monitor does not compute new modes; instead, it records the modes used for EME expansion and propagation, but only within the monitor geometry.

Example

>>> monitor = EMEModeSolverMonitor(
...     center=(1,2,3),
...     size=(2,2,2),
...     freqs=[300e12],
...     num_modes=2,
...     name="eme_modes"
... )

Attributes

Methods

storage_size(num_cells,Β ...)

Size of monitor storage given the number of points after discretization.

Inherited Common Usage

interval_space#
eme_cell_interval_space#
colocate#
normalize#
keep_invalid_modes#
storage_size(num_cells, num_transverse_cells, num_eme_cells, num_freqs, num_modes, num_sweep)[source]#

Size of monitor storage given the number of points after discretization.

__hash__()#

Hash method.