{
  "title": "LobeMeasurer",
  "public_path": "flex_rf.tidy3d.LobeMeasurer",
  "lookup_path": "tidy3d.rf.LobeMeasurer",
  "slug": "flex_rf/tidy3d/LobeMeasurer",
  "public_url": "/rf/latest/autogenerated/flex_rf/tidy3d/lobemeasurer/",
  "object_kind": "class",
  "introduction": "Tool for detecting and analyzing lobes in antenna radiation patterns,\nalong with their characteristics such as direction and beamwidth.",
  "notes": "",
  "examples": "```python\ntheta = np.linspace(0, 2 * np.pi, 301, endpoint=False)\nUrad = np.cos(theta) ** 2 * np.cos(3 * theta) ** 2\nlobe_measurer = LobeMeasurer(\n    angle=theta,\n    radiation_pattern=Urad)\nlobe_measures = lobe_measurer.lobe_measures\n```",
  "references": "",
  "signature": "class LobeMeasurer(MicrowaveBaseModel)",
  "source": {
    "path": "flex/public/tidy3d/tidy3d/plugins/microwave/lobe_measurer.py",
    "url": "",
    "lineno": 31,
    "endlineno": 354
  },
  "bases": [
    "MicrowaveBaseModel"
  ],
  "parameter_rows": [
    {
      "name": "angle",
      "annotation": "ArrayFloat1D",
      "default": "",
      "description": "A 1-dimensional array of angles in radians. The angles should be in the range [0, 2π] and should be sorted in ascending order.",
      "origin": "declared"
    },
    {
      "name": "radiation_pattern",
      "annotation": "ArrayFloat1D",
      "default": "",
      "description": "A 1-dimensional array of real values representing the radiation pattern of the antenna measured on a linear scale.",
      "origin": "declared"
    },
    {
      "name": "apply_cyclic_extension",
      "annotation": "bool",
      "default": "True",
      "description": "To enable accurate peak finding near boundaries of the `angle` array, we need to extend the signal using its periodicity. If lobes near the boundaries are not of interest, this can be set to `False`.",
      "origin": "declared"
    },
    {
      "name": "width_measure",
      "annotation": "float",
      "default": "0.5",
      "description": "Relative magnitude of the lobes at which the beamwidth is measured. Default value of `0.5` corresponds with the half-power beamwidth.",
      "origin": "declared"
    },
    {
      "name": "min_lobe_height",
      "annotation": "float",
      "default": "DEFAULT_MIN_LOBE_REL_HEIGHT",
      "description": "Only lobes in the radiation pattern with heights above this value are found. Lobe heights are measured relative to the maximum value in `radiation_pattern`.",
      "origin": "declared"
    },
    {
      "name": "null_threshold",
      "annotation": "float",
      "default": "DEFAULT_NULL_THRESHOLD",
      "description": "The threshold for detecting nulls, which is relative to the maximum value in the `radiation_pattern`.",
      "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"
    }
  ],
  "members": [
    {
      "name": "cyclic_extension",
      "kind": "function",
      "signature": "cyclic_extension(angle: ArrayLike, signal: ArrayLike)",
      "description": "This helper function extends the given `signal` array by leveraging its periodic nature. It ensures that the peak finding algorithm in Scipy can reliably detect peaks near the minimum and maximum values of the `angle` array. The returned arrays are extended to the range [-π, 3π)."
    },
    {
      "name": "lobe_measures",
      "kind": "function",
      "signature": "lobe_measures()",
      "description": "The lobe measures as a pandas `pandas.DataFrame` with the following columns:"
    },
    {
      "name": "main_lobe",
      "kind": "attribute",
      "signature": "main_lobe: DataFrame",
      "description": "Properties of the main lobe."
    },
    {
      "name": "plot",
      "kind": "function",
      "signature": "plot(lobe_index: int, ax: Ax, include_beamwidth: bool = True, include_FNWB: bool = True)",
      "description": "Annotate an existing `matplotlib` axis with lobe locations and widths."
    },
    {
      "name": "side_lobes",
      "kind": "attribute",
      "signature": "side_lobes: DataFrame",
      "description": "Properties of all side lobes."
    },
    {
      "name": "sidelobe_level",
      "kind": "attribute",
      "signature": "sidelobe_level: float | None",
      "description": "The sidelobe level returned on a linear scale."
    }
  ],
  "group": "flex_rf.tidy3d"
}
