tidy3d.plugins.smatrix.DirectivityMonitorSpec#
- class DirectivityMonitorSpec[source]#
Bases:
MicrowaveBaseModelSpecification 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,
attrsare mutable. For example, the following is allowed for setting anattrobj.attrs['foo'] = bar. Also note that Tidy3D will raise aTypeErrorifattrscontain objects that can not be serialized. One can check ifattrsare serializable by callingobj.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_monitorstuple: :param : :param aDirectivityMonitorwill be automatically generated with the specified: :param parameters. This allows users to mix manualDirectivityMonitorobjects: :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.