tidy3d.Monitor#

class Monitor[source]#

Bases: AbstractMonitor

Abstract base class for monitors.

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[Literal[1], Literal[1], Literal[1]] = (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. Not all monitors support values different from 1.

  • colocate (Literal[True] = True) – Defines whether fields are colocated to grid cell boundaries (i.e. to the primal grid). Can be toggled for field recording monitors and is hard-coded for other monitors depending on their specific function.

  • use_colocated_integration (Literal[True] = True) – Whether to use colocated fields for flux, dot products, and overlap integrals. Hard-coded to True for most monitor types. Can be toggled on field and overlap monitors.

Notes

Practical Advice

Choosing a Monitor Type

  • FluxMonitor — total power flow through a surface. Output: sim_data["name"].flux (xarray DataArray indexed by frequency).

  • ModeMonitor — decompose fields into waveguide mode amplitudes. Output: sim_data["name"].amps.sel(direction="+", mode_index=0). Size should be 3-4x the waveguide width in each transverse dimension.

  • FieldMonitor — record E/H field components in the frequency domain. Output: sim_data["name"].Ex, .Ey, etc.

  • FieldTimeMonitor — record E/H fields vs time. Useful for animations and time-domain decay analysis (Q-factor extraction).

  • DiffractionMonitor — grating diffraction order efficiencies.

  • FieldProjectionAngleMonitor — far-field radiation pattern via near-to-far-field transformation.

Attributes

Methods

storage_size(num_cells, tmesh)

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

interval_space#
colocate#
use_colocated_integration#
abstract storage_size(num_cells, tmesh)[source]#

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