tidy3d.components.base_sim.monitor.AbstractMonitor#
- class AbstractMonitor[source]#
-
Abstract base class for steady-state 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.
Attributes
Boxrepresentation of monitor.Default parameters for plotting a Monitor object.
sizecenterMethods
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.
- 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:
- 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 (np.ndarray) – 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:
np.ndarray