tidy3d.plugins.smatrix.DirectivityMonitorSpec#

class DirectivityMonitorSpec[source]#

Bases: MicrowaveBaseModel

Specification for automatically generating a DirectivityMonitor.

Parameters:
  • attrs (dict = {}) – Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields, attrs are mutable. For example, the following is allowed for setting an attr obj.attrs['foo'] = bar. Also note that Tidy3D will raise a TypeError if attrs contain objects that can not be serialized. One can check if attrs are serializable by calling obj.json().

  • name (Optional[str] = None) – Optional name for the auto-generated monitor. If not provided, defaults to β€˜radiation_’ + index of the monitor in the list of radiation monitors.

  • freqs (Optional[Tuple[NonNegativeInt, ...]] = None) – Frequencies to obtain fields at. If not provided, uses all frequencies from the TerminalComponentModeler. Must be a subset of modeler frequencies if provided.

  • buffer (NonNegativeInt = 2) – Number of grid cells to maintain between monitor and PML/domain boundaries. Default: 2 cells.

  • num_theta_points (NonNegativeInt = 100) – Number of elevation angle (theta) sample points from 0 to Ο€. Default: 100.

  • num_phi_points (NonNegativeInt = 200) – Number of azimuthal angle (phi) sample points from -Ο€ to Ο€. Default: 200.

  • custom_origin (Optional[Tuple[float, float, float]] = (0, 0, 0)) – [units = um]. Local origin used for defining observation points. If None, uses the monitor’s center.

:param When included in the TerminalComponentModeler.radiation_monitors tuple: :param : :param a DirectivityMonitor will be automatically generated with the specified: :param parameters. This allows users to mix manual DirectivityMonitor objects: :param with automatically generated ones: :param each with customizable parameters.:

Note

The default origin (custom_origin) for defining observation points in the automatically generated monitor is set to (0, 0, 0) in the global coordinate system.

Example

>>> auto_monitor = DirectivityMonitorSpec(
...     name="custom_auto",
...     buffer=3,
...     num_theta_points=50,
...     num_phi_points=100
... )

Attributes

Methods

Inherited Common Usage

name#
freqs#
buffer#
num_theta_points#
num_phi_points#
custom_origin#
__hash__()#

Hash method.