{
  "title": "ImpedanceCalculator",
  "public_path": "flex_rf.tidy3d.ImpedanceCalculator",
  "lookup_path": "tidy3d.rf.ImpedanceCalculator",
  "slug": "flex_rf/tidy3d/ImpedanceCalculator",
  "public_url": "/rf/latest/autogenerated/flex_rf/tidy3d/impedancecalculator/",
  "object_kind": "class",
  "introduction": "Tool for computing the characteristic impedance of a transmission line.",
  "notes": "",
  "examples": "Create a calculator with both voltage and current path integrals defined.\n\n```python\nv_int = AxisAlignedVoltageIntegral(\n    center=(0, 0, 0),\n    size=(0, 0, 2),\n    sign=\"+\",\n    extrapolate_to_endpoints=True,\n    snap_path_to_grid=True,\n)\ni_int = AxisAlignedCurrentIntegral(\n    center=(0, 0, 0),\n    size=(1, 1, 0),\n    sign=\"+\",\n    extrapolate_to_endpoints=True,\n    snap_contour_to_grid=True,\n)\ncalc = ImpedanceCalculator(voltage_integral=v_int, current_integral=i_int)\n```\n\nYou can also define only one of the integrals. At least one is required.\n\n```python\n_ = ImpedanceCalculator(voltage_integral=v_int)\n```",
  "references": "",
  "signature": "class ImpedanceCalculator(MicrowaveBaseModel)",
  "source": {
    "path": "flex/public/tidy3d/tidy3d/components/microwave/impedance_calculator.py",
    "url": "",
    "lineno": 45,
    "endlineno": 193
  },
  "bases": [
    "MicrowaveBaseModel"
  ],
  "parameter_rows": [
    {
      "name": "voltage_integral",
      "annotation": "VoltageIntegralType | None",
      "default": "None",
      "description": "Definition of path integral for computing voltage.",
      "origin": "declared"
    },
    {
      "name": "current_integral",
      "annotation": "CurrentIntegralType | None",
      "default": "None",
      "description": "Definition of contour integral for computing current.",
      "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": "check_voltage_or_current",
      "kind": "function",
      "signature": "check_voltage_or_current()",
      "description": "Raise validation error if both `voltage_integral` and `current_integral` are not provided."
    },
    {
      "name": "compute_impedance",
      "kind": "function",
      "signature": "compute_impedance(em_field: IntegrableMonitorDataType, return_voltage_and_current: bool = False)",
      "description": "Compute impedance for the supplied `em_field` using `voltage_integral` and `current_integral`. If only a single integral has been defined, impedance is computed using the total flux in `em_field`."
    },
    {
      "name": "compute_voltage_current",
      "kind": "function",
      "signature": "compute_voltage_current(em_field: IntegrableMonitorDataType)",
      "description": "Compute voltage and current for the supplied `em_field` using `voltage_integral` and `current_integral`. None is returned for the integral that is not defined."
    }
  ],
  "group": "flex_rf.tidy3d"
}
