tidy3d.EMEFieldMonitor#

class EMEFieldMonitor[source]#

Bases: EMEMonitor, AbstractFieldMonitor

EME monitor for propagated electromagnetic field.

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

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

  • name (str) – Unique name for monitor.

  • interval_space (tuple[PositiveInt, PositiveInt, PositiveInt] = (1, 1, 1)) – 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.

  • 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.

  • use_colocated_integration (bool = True) – Only takes effect when colocate=False. If True, flux, dot products, and overlap integrals still use fields interpolated to grid cell boundaries (colocated), even though the field data is stored at native Yee grid positions. Experimental feature that can give improved accuracy by avoiding interpolation of fields to Yee cell positions for integration.

  • fields (tuple[Literal['Ex', 'Ey', 'Ez', 'Hx', 'Hy', 'Hz'], ...] = ['Ex', 'Ey', 'Ez', 'Hx', 'Hy', 'Hz']) – Collection of field components to store in the monitor.

  • freqs (Optional[ArrayLike[dtype=float, ndim=1]] = 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. For ‘EMEFieldMonitor’, refers to the number of modes at each port.Cannot exceed the max of the number of modes in the two ports. 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.

  • eme_cell_interval_space (Literal[1] = 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. Note: this field is not used for EME field monitor.

Notes

Records the E and H fields assembled from EME modes and their propagation coefficients. The field is stored as a function of spatial coordinates, frequency, sweep_index, eme_port_index, and mode_index, where eme_port_index indicates the excitation port and mode_index indicates the excited mode at that port.

Example

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

Attributes

interval_space

eme_cell_interval_space

colocate

num_modes

freqs

num_sweep

fields

use_colocated_integration

name

size

center

Methods

storage_size(num_cells, ...)

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

interval_space#
eme_cell_interval_space#
colocate#
num_modes#
storage_size(num_cells, num_transverse_cells, num_eme_cells, num_virtual_eme_cells, num_freqs, num_modes, sweep_spec)[source]#

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