{
  "title": "AntennaMetricsData",
  "public_path": "flex_rf.tidy3d.AntennaMetricsData",
  "lookup_path": "tidy3d.rf.AntennaMetricsData",
  "slug": "flex_rf/tidy3d/AntennaMetricsData",
  "public_url": "/rf/latest/autogenerated/flex_rf/tidy3d/antennametricsdata/",
  "object_kind": "class",
  "introduction": "Data representing the main parameters and figures of merit for antennas.",
  "notes": "The definitions of radiation efficiency, reflection efficiency, gain, and realized gain\nare based on:\n\nBalanis, Constantine A., \"Antenna Theory: Analysis and Design,\"\nJohn Wiley & Sons, Chapter 2.9 (2016).",
  "examples": "```python\nimport numpy as np\nfrom tidy3d.components.data.monitor_data import FluxDataArray, FieldProjectionAngleDataArray\nfrom tidy3d.components.monitor import DirectivityMonitor\nf = np.linspace(1e14, 2e14, 10)\nr = np.atleast_1d(1e6)\ntheta = np.linspace(0, np.pi, 10)\nphi = np.linspace(0, 2*np.pi, 20)\ncoords = dict(r=r, theta=theta, phi=phi, f=f)\ncoords_flux = dict(f=f)\nfield_values = (1+1j) * np.random.random((len(r), len(theta), len(phi), len(f)))\nflux_data = FluxDataArray(np.random.random(len(f)), coords=coords_flux)\nscalar_field = FieldProjectionAngleDataArray(field_values, coords=coords)\nmonitor = DirectivityMonitor(\n    center=(1,2,3),\n    size=(2,2,2),\n    freqs=f,\n    name=\"rad_monitor\",\n    phi=phi,\n    theta=theta\n)\npower_data = FreqDataArray(np.random.random(len(f)), coords=coords_flux)\ndata = AntennaMetricsData(\n    monitor=monitor,\n    projection_surfaces=monitor.projection_surfaces,\n    flux=flux_data,\n    Er=scalar_field,\n    Etheta=scalar_field,\n    Ephi=scalar_field,\n    Hr=scalar_field,\n    Htheta=scalar_field,\n    Hphi=scalar_field,\n    power_incident=power_data,\n    power_reflected=power_data\n)\n```",
  "references": "",
  "signature": "class AntennaMetricsData(DirectivityData, MicrowaveBaseModel)",
  "source": {
    "path": "flex/public/tidy3d/tidy3d/components/microwave/data/monitor_data.py",
    "url": "",
    "lineno": 50,
    "endlineno": 229
  },
  "bases": [
    "DirectivityData",
    "MicrowaveBaseModel"
  ],
  "parameter_rows": [
    {
      "name": "power_incident",
      "annotation": "FreqDataArray",
      "default": "",
      "description": "Array of values representing the incident power to an antenna.",
      "origin": "declared"
    },
    {
      "name": "power_reflected",
      "annotation": "FreqDataArray",
      "default": "",
      "description": "Array of values representing power reflected due to an impedance mismatch with the antenna.",
      "origin": "declared"
    },
    {
      "name": "attrs",
      "annotation": "dict",
      "default": "factory: dict",
      "description": "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.model_dump_json()`.",
      "origin": "inherited"
    },
    {
      "name": "monitor",
      "annotation": "DirectivityMonitor",
      "default": "",
      "description": "Monitor describing the angle-based projection grid on which to measure directivity data.",
      "origin": "inherited"
    },
    {
      "name": "Er",
      "annotation": "FieldProjectionAngleDataArray",
      "default": "",
      "description": "Spatial distribution of r-component of the electric field.",
      "origin": "inherited"
    },
    {
      "name": "Etheta",
      "annotation": "FieldProjectionAngleDataArray",
      "default": "",
      "description": "Spatial distribution of the theta-component of the electric field.",
      "origin": "inherited"
    },
    {
      "name": "Ephi",
      "annotation": "FieldProjectionAngleDataArray",
      "default": "",
      "description": "Spatial distribution of phi-component of the electric field.",
      "origin": "inherited"
    },
    {
      "name": "Hr",
      "annotation": "FieldProjectionAngleDataArray",
      "default": "",
      "description": "Spatial distribution of r-component of the magnetic field.",
      "origin": "inherited"
    },
    {
      "name": "Htheta",
      "annotation": "FieldProjectionAngleDataArray",
      "default": "",
      "description": "Spatial distribution of theta-component of the magnetic field.",
      "origin": "inherited"
    },
    {
      "name": "Hphi",
      "annotation": "FieldProjectionAngleDataArray",
      "default": "",
      "description": "Spatial distribution of phi-component of the magnetic field.",
      "origin": "inherited"
    },
    {
      "name": "medium",
      "annotation": "MediumType",
      "default": "factory: Medium",
      "description": "Background medium through which to project fields.",
      "origin": "inherited"
    },
    {
      "name": "is_2d_simulation",
      "annotation": "bool",
      "default": "False",
      "description": "Indicates whether the monitor data is for a 2D simulation.",
      "origin": "inherited"
    },
    {
      "name": "projection_surfaces",
      "annotation": "tuple[FieldProjectionSurface, ...]",
      "default": "",
      "description": "Surfaces of the monitor where near fields were recorded for projection",
      "origin": "inherited"
    },
    {
      "name": "flux",
      "annotation": "FluxDataArray",
      "default": "",
      "description": "Flux values that are either computed from fields recorded on the projection surfaces or by integrating the projected fields over a spherical surface.",
      "origin": "inherited"
    }
  ],
  "members": [
    {
      "name": "from_directivity_data",
      "kind": "function",
      "signature": "from_directivity_data(dir_data: DirectivityData, power_inc: FreqDataArray, power_refl: FreqDataArray)",
      "description": "Create `AntennaMetricsData` from directivity data and power measurements."
    },
    {
      "name": "gain",
      "kind": "attribute",
      "signature": "gain: FieldProjectionAngleDataArray",
      "description": "The gain figure of merit for antennas. Gain is dimensionless."
    },
    {
      "name": "partial_gain",
      "kind": "function",
      "signature": "partial_gain(pol_basis: PolarizationBasis = 'linear', tilt_angle: float | None = None)",
      "description": "The partial gain figures of merit for antennas. The partial gains are computed in the `linear` or `circular` polarization bases. If `tilt_angle` is not `None`, the partial directivity is computed in the linear polarization basis rotated by `tilt_angle` from the theta-axis. Gain is dimensionless."
    },
    {
      "name": "partial_realized_gain",
      "kind": "function",
      "signature": "partial_realized_gain(pol_basis: PolarizationBasis = 'linear', tilt_angle: float | None = None)",
      "description": "The partial realized gain figures of merit for antennas. The partial gains are computed in the `linear` or `circular` polarization bases. If `tilt_angle` is not `None`, the partial directivity is computed in the linear polarization basis rotated by `tilt_angle` from the theta-axis. Gain is dimensionless."
    },
    {
      "name": "radiation_efficiency",
      "kind": "attribute",
      "signature": "radiation_efficiency: FreqDataArray",
      "description": "The radiation efficiency of the antenna."
    },
    {
      "name": "realized_gain",
      "kind": "attribute",
      "signature": "realized_gain: FieldProjectionAngleDataArray",
      "description": "The realized gain figure of merit for antennas. Realized gain is dimensionless."
    },
    {
      "name": "reflection_efficiency",
      "kind": "attribute",
      "signature": "reflection_efficiency: FreqDataArray",
      "description": "The reflection efficiency of the antenna, which is due to an impedance mismatch."
    },
    {
      "name": "supplied_power",
      "kind": "attribute",
      "signature": "supplied_power: FreqDataArray",
      "description": "The power supplied to the antenna, which takes into account reflections."
    }
  ],
  "group": "flex_rf.tidy3d"
}
