tidy3d.AntennaMetricsData#
- class AntennaMetricsData[source]#
Bases:
DirectivityData
Data representing the main parameters and figures of merit for antennas.
- 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 anattr
obj.attrs['foo'] = bar
. Also note that Tidy3D` will raise aTypeError
ifattrs
contain objects that can not be serialized. One can check ifattrs
are serializable by callingobj.json()
.monitor (DirectivityMonitor) β Monitor describing the angle-based projection grid on which to measure directivity data.
Er (FieldProjectionAngleDataArray) β Spatial distribution of r-component of the electric field.
Etheta (FieldProjectionAngleDataArray) β Spatial distribution of the theta-component of the electric field.
Ephi (FieldProjectionAngleDataArray) β Spatial distribution of phi-component of the electric field.
Hr (FieldProjectionAngleDataArray) β Spatial distribution of r-component of the magnetic field.
Htheta (FieldProjectionAngleDataArray) β Spatial distribution of theta-component of the magnetic field.
Hphi (FieldProjectionAngleDataArray) β Spatial distribution of phi-component of the magnetic field.
medium (Union[Medium, AnisotropicMedium, PECMedium, PoleResidue, Sellmeier, Lorentz, Debye, Drude, FullyAnisotropicMedium, CustomMedium, CustomPoleResidue, CustomSellmeier, CustomLorentz, CustomDebye, CustomDrude, CustomAnisotropicMedium, PerturbationMedium, PerturbationPoleResidue, LossyMetalMedium, Medium2D, AnisotropicMediumFromMedium2D] = Medium(attrs={}, name=None, frequency_range=None, allow_gain=False, nonlinear_spec=None, modulation_spec=None, viz_spec=None, heat_spec=None, type='Medium', permittivity=1.0, conductivity=0.0)) β Background medium through which to project fields.
is_2d_simulation (bool = False) β Indicates whether the monitor data is for a 2D simulation.
projection_surfaces (Tuple[FieldProjectionSurface, ...]) β Surfaces of the monitor where near fields were recorded for projection
flux (FluxDataArray) β Flux values that are either computed from fields recorded on the projection surfaces or by integrating the projected fields over a spherical surface.
power_incident (FreqDataArray) β Array of values representing the incident power to an antenna.
power_reflected (FreqDataArray) β Array of values representing power reflected due to an impedance mismatch with the antenna.
Example
>>> import numpy as np >>> from tidy3d.components.data.monitor_data import FluxDataArray, FieldProjectionAngleDataArray >>> from tidy3d.components.monitor import DirectivityMonitor >>> f = np.linspace(1e14, 2e14, 10) >>> r = np.atleast_1d(1e6) >>> theta = np.linspace(0, np.pi, 10) >>> phi = np.linspace(0, 2*np.pi, 20) >>> coords = dict(r=r, theta=theta, phi=phi, f=f) >>> coords_flux = dict(f=f) >>> field_values = (1+1j) * np.random.random((len(r), len(theta), len(phi), len(f))) >>> flux_data = FluxDataArray(np.random.random(len(f)), coords=coords_flux) >>> scalar_field = FieldProjectionAngleDataArray(field_values, coords=coords) >>> monitor = DirectivityMonitor( ... center=(1,2,3), ... size=(2,2,2), ... freqs=f, ... name="rad_monitor", ... phi=phi, ... theta=theta ... ) >>> power_data = FreqDataArray(np.random.random(len(f)), coords=coords_flux) >>> data = AntennaMetricsData( ... monitor=monitor, ... projection_surfaces=monitor.projection_surfaces, ... flux=flux_data, ... Er=scalar_field, ... Etheta=scalar_field, ... Ephi=scalar_field, ... Hr=scalar_field, ... Htheta=scalar_field, ... Hphi=scalar_field, ... power_incident=power_data, ... power_reflected=power_data ... )
Notes
The definitions of radiation efficiency, reflection efficiency, gain, and realized gain are based on:
Balanis, Constantine A., βAntenna Theory: Analysis and Design,β John Wiley & Sons, Chapter 2.9 (2016).
Attributes
The gain figure of merit for antennas.
The radiation efficiency of the antenna.
The realized gain figure of merit for antennas.
The reflection efficiency of the antenna, which is due to an impedance mismatch.
The power supplied to the antenna, which takes into account reflections.
Methods
from_directivity_data
(dir_data,Β power_inc,Β ...)Create
AntennaMetricsData
from directivity data and power measurements.partial_gain
([pol_basis,Β tilt_angle])The partial gain figures of merit for antennas.
partial_realized_gain
([pol_basis,Β tilt_angle])The partial realized gain figures of merit for antennas.
Inherited Common Usage
- power_incident#
- power_reflected#
- static from_directivity_data(dir_data, power_inc, power_refl)[source]#
Create
AntennaMetricsData
from directivity data and power measurements.- Parameters:
dir_data (
DirectivityData
) β Directivity data containing field components and flux measurements.power_inc (
FreqDataArray
) β Array of values representing the incident power to an antenna.power_refl (
FreqDataArray
) β Array of values representing power reflected due to impedance mismatch with the antenna.
- Returns:
New instance combining directivity data with incident and reflected power measurements.
- Return type:
- property supplied_power#
The power supplied to the antenna, which takes into account reflections.
- property radiation_efficiency#
The radiation efficiency of the antenna.
- property reflection_efficiency#
The reflection efficiency of the antenna, which is due to an impedance mismatch.
- partial_gain(pol_basis='linear', tilt_angle=None)[source]#
The partial gain figures of merit for antennas. The partial gains are computed in the
linear
orcircular
polarization bases. Iftilt_angle
is notNone
, the partial directivity is computed in the linear polarization basis rotated bytilt_angle
from the theta-axis. Gain is dimensionless.- Parameters:
pol_basis (PolarizationBasis) β The desired polarization basis used to express partial gain, either
linear
orcircular
.tilt_angle (float) β The angle by which the co-polar vector is rotated from the theta-axis. At
tilt_angle
= 0, the co-polar vector coincides with the theta-axis and the cross-polar vector coincides with the phi-axis; while attilt_angle = pi/2
, the co-polar vector coincides with the phi-axis.
- Returns:
Dataset containing the partial gains split into the two polarization states.
- Return type:
xarray.Dataset
- property gain#
The gain figure of merit for antennas. Gain is dimensionless.
- partial_realized_gain(pol_basis='linear', tilt_angle=None)[source]#
The partial realized gain figures of merit for antennas. The partial gains are computed in the
linear
orcircular
polarization bases. Iftilt_angle
is notNone
, the partial directivity is computed in the linear polarization basis rotated bytilt_angle
from the theta-axis. Gain is dimensionless.- Parameters:
pol_basis (PolarizationBasis) β The desired polarization basis used to express partial gain, either
linear
orcircular
.tilt_angle (float) β The angle by which the co-polar vector is rotated from the theta-axis. At
tilt_angle
= 0, the co-polar vector coincides with the theta-axis and the cross-polar vector coincides with the phi-axis; while attilt_angle = pi/2
, the co-polar vector coincides with the phi-axis.
- Returns:
Dataset containing the partial realized gains split into the two polarization states.
- Return type:
xarray.Dataset
- property realized_gain#
The realized gain figure of merit for antennas. Realized gain is dimensionless.
- __hash__()#
Hash method.