tidy3d.components.base_sim.monitor.AbstractMonitor#

class AbstractMonitor[source]#

Bases: Box, ABC

Abstract base class for steady-state monitors.

Parameters:
  • center (Tuple[float, float, float] = (0.0, 0.0, 0.0)) – [units = um]. Center of object in x, y, and z.

  • size (Tuple[NonNegativeFloat, NonNegativeFloat, NonNegativeFloat]) – [units = um]. Size in x, y, and z directions.

  • name (ConstrainedStrValue) – Unique name for monitor.

Attributes

geometry

Box representation of monitor.

plot_params

Default parameters for plotting a Monitor object.

Methods

downsample(arr, axis)

Downsample a 1D array making sure to keep the first and last entries, based on the spatial interval defined for the axis.

downsampled_num_cells(num_cells)

Given a tuple of the number of cells spanned by the monitor along each dimension, return the number of cells one would have after downsampling based on interval_space.

storage_size(num_cells, tmesh)

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

Inherited Common Usage

name#
property plot_params#

Default parameters for plotting a Monitor object.

property geometry#

Box representation of monitor.

Returns:

Representation of the monitor geometry as a Box.

Return type:

Box

abstract storage_size(num_cells, tmesh)[source]#

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

Parameters:
  • num_cells (int) – Number of grid cells within the monitor after discretization by a Simulation.

  • tmesh (Array) – The discretized time mesh of a Simulation.

Returns:

Number of bytes to be stored in monitor.

Return type:

int

downsample(arr, axis)[source]#

Downsample a 1D array making sure to keep the first and last entries, based on the spatial interval defined for the axis.

Parameters:
  • arr (Numpy) – A 1D array of arbitrary type.

  • axis (Axis) – Axis for which to select the interval_space defined for the monitor.

Returns:

Downsampled array.

Return type:

Numpy

downsampled_num_cells(num_cells)[source]#

Given a tuple of the number of cells spanned by the monitor along each dimension, return the number of cells one would have after downsampling based on interval_space.

__hash__()#

Hash method.