{
  "title": "WavePort",
  "public_path": "flex_rf.tidy3d.WavePort",
  "lookup_path": "tidy3d.rf.WavePort",
  "slug": "flex_rf/tidy3d/WavePort",
  "public_url": "/rf/latest/autogenerated/flex_rf/tidy3d/waveport/",
  "object_kind": "class",
  "introduction": "Class representing a single modal-driven wave port.",
  "notes": "By default, the characteristic impedance of each mode is used as the reference impedance\nfor S-parameter calculations.",
  "examples": "",
  "references": "",
  "signature": "class WavePort(AbstractWavePort)",
  "source": {
    "path": "flex/public/tidy3d/tidy3d/plugins/smatrix/ports/wave.py",
    "url": "",
    "lineno": 899,
    "endlineno": 1221
  },
  "bases": [
    "AbstractWavePort"
  ],
  "parameter_rows": [
    {
      "name": "mode_spec",
      "annotation": "MicrowaveModeSpec",
      "default": "factory: MicrowaveModeSpec._default_without_license_warning",
      "description": "Parameters to feed to mode solver which determine modes and how transmission line quantities, e.g., characteristic impedance, are computed.",
      "origin": "declared"
    },
    {
      "name": "mode_index",
      "annotation": "NonNegativeInt | None",
      "default": "None",
      "description": "Index into the collection of modes returned by mode solver. Specifies which mode to inject using this port. Deprecated. Use the 'mode_selection' field instead.",
      "origin": "declared"
    },
    {
      "name": "mode_selection",
      "annotation": "tuple[int, ...] | None",
      "default": "None",
      "description": "Selects specific mode(s) to use from the mode solver. Can be a single integer for one mode, or a tuple of integers for multiple modes. If `None` (default), all modes from the `mode_spec` are used. Indices must be non-negative and less than `mode_spec.num_modes`.",
      "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": "center",
      "annotation": "TracedCoordinate",
      "default": "(0.0, 0.0, 0.0)",
      "description": "Center of object in x, y, and z.",
      "origin": "inherited"
    },
    {
      "name": "size",
      "annotation": "TracedSize",
      "default": "",
      "description": "Size in x, y, and z directions.",
      "origin": "inherited"
    },
    {
      "name": "name",
      "annotation": "str",
      "default": "",
      "description": "Unique name for the port.",
      "origin": "inherited"
    },
    {
      "name": "direction",
      "annotation": "Direction",
      "default": "",
      "description": "'+' or '-', defining which direction is considered 'input'.",
      "origin": "inherited"
    },
    {
      "name": "num_grid_cells",
      "annotation": "int | None",
      "default": "DEFAULT_WAVE_PORT_NUM_CELLS",
      "description": "Number of mesh grid cells in the transverse plane of the `WavePort`. Used in generating the suggested list of `MeshOverrideStructure` objects. Must be greater than or equal to 3. When set to `None`, no grid refinement is performed.",
      "origin": "inherited"
    },
    {
      "name": "conjugated_dot_product",
      "annotation": "bool",
      "default": "False",
      "description": "Use conjugated or non-conjugated dot product for mode decomposition.",
      "origin": "inherited"
    },
    {
      "name": "frame",
      "annotation": "PECFrame | None",
      "default": "DEFAULT_WAVE_PORT_FRAME",
      "description": "Add a thin frame around the source during FDTD run for an improved injection.",
      "origin": "inherited"
    },
    {
      "name": "absorber",
      "annotation": "bool | ABCBoundary | ModeABCBoundary",
      "default": "True",
      "description": "Place a mode absorber in the port. If `True`, an automatically generated mode absorber is placed in the port. If `ABCBoundary` or `ModeABCBoundary`, a mode absorber is placed in the port with the specified boundary conditions.",
      "origin": "inherited"
    },
    {
      "name": "extrude_structures",
      "annotation": "bool",
      "default": "False",
      "description": "Extrudes structures that intersect the wave port plane by a few grid cells when `True`, improving mode injection accuracy.",
      "origin": "inherited"
    },
    {
      "name": "reference_impedance",
      "annotation": "Literal['Z0'] | Complex | ImpedanceModeDataArray | ImpedanceTerminalDataArray",
      "default": "'Z0'",
      "description": "User-specified reference impedance for S-parameter computation. If `Z0` (default), the characteristic impedance is used. Otherwise, it can be a single complex value applied to all modes, or a data array specified for each. If the data array misses some modes, 50 Ohm is applied to the missing ones.",
      "origin": "inherited"
    }
  ],
  "members": [
    {
      "name": "compute_current",
      "kind": "function",
      "signature": "compute_current(sim_data: SimulationData)",
      "description": "Helper to compute current flowing through the port."
    },
    {
      "name": "compute_voltage",
      "kind": "function",
      "signature": "compute_voltage(sim_data: SimulationData)",
      "description": "Helper to compute voltage across the port."
    },
    {
      "name": "get_characteristic_impedance_matrix",
      "kind": "function",
      "signature": "get_characteristic_impedance_matrix(sim_mode_data: SimulationData | MicrowaveModeData)",
      "description": "Retrieve the characteristic impedance matrix of the port."
    },
    {
      "name": "get_port_impedance",
      "kind": "function",
      "signature": "get_port_impedance(sim_mode_data: SimulationData | MicrowaveModeData, mode_index: int)",
      "description": "Retrieve the reference impedance of the port for a specific mode."
    },
    {
      "name": "to_source",
      "kind": "function",
      "signature": "to_source(source_time: SourceTimeType, snap_center: float | None = None, mode_index: int = 0, mode_spec: MicrowaveModeSpecType | None = None)",
      "description": "Create a mode source from the wave port."
    }
  ],
  "group": "flex_rf.tidy3d"
}
