tidy3d.components.base_sim.monitor.AbstractMonitor#

class AbstractMonitor[source]#

Bases: Box, ABC

Abstract base class for steady-state monitors.

Parameters:
  • center (Attribute: center) –

    Type

    Tuple[float, float, float]

    Default

    = (0.0, 0.0, 0.0)

    Units

    um

    Description

    Center of object in x, y, and z.

  • size (Attribute: size) –

    Type

    Tuple[NonNegativeFloat, NonNegativeFloat, NonNegativeFloat]

    Default

    Units

    um

    Description

    Size in x, y, and z directions.

  • name (Attribute: name) –

    Type

    ConstrainedStrValue

    Default

    Description

    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.

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.