{
  "title": "TerminalWavePort",
  "public_path": "flex_rf.tidy3d.TerminalWavePort",
  "lookup_path": "tidy3d.rf.TerminalWavePort",
  "slug": "flex_rf/tidy3d/TerminalWavePort",
  "public_url": "/rf/latest/autogenerated/flex_rf/tidy3d/terminalwaveport/",
  "object_kind": "class",
  "introduction": "Class representing a single terminal-driven wave port.",
  "notes": "- By default, the terminals are single-ended, specified by `terminal_specs` parameters. They are\n  labeled by `T0`, `T1`, ..., `Tn`, where the order is defined by their order in `terminal_specs`\n  if it's a tuple/list, or their location from left to right and bottom to top if `terminal_specs`\n  is an `AutoImpedanceSpec`.\n- Differential pairs are defined by selecting a pair of single-ended terminals based on their labels.\n  The differential pair itself is labeled by \"Diff0@comm\", \"Diff0@diff\", \"Diff1@comm\", \"Diff1@diff\", ...,\n  where the order is defined by their order in `differential_pairs`.\n- The terminals are ordered so that the single-ended terminal labels come first, followed by differential pairs.\n- By default, a reference impedance of 50 Ohm is used for S-parameter calculations unless otherwise specified.",
  "examples": "",
  "references": "",
  "signature": "class TerminalWavePort(AbstractWavePort)",
  "source": {
    "path": "flex/public/tidy3d/tidy3d/plugins/smatrix/ports/wave.py",
    "url": "",
    "lineno": 1224,
    "endlineno": 1552
  },
  "bases": [
    "AbstractWavePort"
  ],
  "parameter_rows": [
    {
      "name": "reference_impedance",
      "annotation": "Literal['Z0'] | Complex | ImpedanceTerminalDataArray",
      "default": "'Z0'",
      "description": "User-specified reference impedance for S-parameter computation. If `Z0`, the characteristic impedance is used. Otherwise, it can be a single complex value applied to all terminals, or a data array specified for each terminal. If the data array misses some terminals, 50 Ohm is applied to the missing terminals. By default, 50 Ohm is used.",
      "origin": "declared"
    },
    {
      "name": "absorber",
      "annotation": "bool | ABCBoundary | ModeABCBoundary",
      "default": "False",
      "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": "declared"
    },
    {
      "name": "terminal_specs",
      "annotation": "AutoImpedanceSpec | tuple[CustomImpedanceSpec, ...]",
      "default": "factory: AutoImpedanceSpec._default_without_license_warning",
      "description": "Parameters to feed to terminal solver which determine single-ended terminals and how transmission line quantities for each single-ended terminal, e.g., charateristic impedance, are computed.",
      "origin": "declared"
    },
    {
      "name": "differential_pairs",
      "annotation": "tuple[tuple[str, str], ...]",
      "default": "()",
      "description": "Differential pairs defined by a pair of single-ended terminals based on their labels, which can be found out through `TerminalComponentModeler`.plot_port() method. In each pair, the first termial is positive, while the second is negative.",
      "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": "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"
    }
  ],
  "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": "to_source",
      "kind": "function",
      "signature": "to_source(source_time: SourceTimeType, snap_center: float | None = None, terminal_label: str | None = None, mode_spec: MicrowaveModeSpecType | None = None)",
      "description": "Create a microwave terminal source from the wave port."
    }
  ],
  "group": "flex_rf.tidy3d"
}
