{
  "title": "MicrowaveModeData",
  "public_path": "flex_rf.tidy3d.MicrowaveModeData",
  "lookup_path": "tidy3d.rf.MicrowaveModeData",
  "slug": "flex_rf/tidy3d/MicrowaveModeData",
  "public_url": "/rf/latest/autogenerated/flex_rf/tidy3d/microwavemodedata/",
  "object_kind": "class",
  "introduction": "Data associated with a `ModeMonitor` for microwave and RF applications: modal amplitudes,\npropagation indices, mode profiles, and transmission line data.",
  "notes": "This class extends `ModeData` with additional microwave-specific data including\ncharacteristic impedance, voltage coefficients, and current coefficients. The data is\nstored as [DataArray](https://docs.xarray.dev/en/stable/generated/xarray.DataArray.html)\nobjects using the [xarray](https://docs.xarray.dev/en/stable/index.html) package.\n\nThe microwave mode data contains all the information from `ModeData` plus additional\nmicrowave dataset with impedance calculations performed using voltage and current line integrals\nas specified in the `MicrowaveModeSpec`.",
  "examples": "```python\nimport tidy3d as td\nimport numpy as np\nfrom tidy3d.components.data.data_array import (\n    CurrentFreqModeDataArray,\n    ImpedanceFreqModeDataArray,\n    ModeAmpsDataArray,\n    ModeIndexDataArray,\n    VoltageFreqModeDataArray,\n)\nfrom tidy3d.components.microwave.data.dataset import TransmissionLineDataset\ndirection = [\"+\", \"-\"]\nf = [1e14, 2e14, 3e14]\nmode_index = np.arange(3)\nindex_coords = dict(f=f, mode_index=mode_index)\nindex_data = ModeIndexDataArray((1+1j) * np.random.random((3, 3)), coords=index_coords)\namp_coords = dict(direction=direction, f=f, mode_index=mode_index)\namp_data = ModeAmpsDataArray((1+1j) * np.random.random((2, 3, 3)), coords=amp_coords)\nimpedance_data = ImpedanceFreqModeDataArray(50 * np.ones((3, 3)), coords=index_coords)\nvoltage_data = VoltageFreqModeDataArray((1+1j) * np.random.random((3, 3)), coords=index_coords)\ncurrent_data = CurrentFreqModeDataArray((0.02+0.01j) * np.random.random((3, 3)), coords=index_coords)\ntl_data = TransmissionLineDataset(\n    Z0=impedance_data,\n    voltage_coeffs=voltage_data,\n    current_coeffs=current_data\n)\nmonitor = td.MicrowaveModeMonitor(\n   center=(0, 0, 0),\n   size=(2, 0, 6),\n   freqs=[2e14, 3e14],\n   mode_spec=td.MicrowaveModeSpec(num_modes=3, impedance_specs=td.AutoImpedanceSpec()),\n   name='microwave_mode',\n)\ndata = MicrowaveModeData(\n    monitor=monitor,\n    amps=amp_data,\n    n_complex=index_data,\n    transmission_line_data=tl_data\n)\n```",
  "references": "",
  "signature": "class MicrowaveModeData(MicrowaveModeDataBase, ModeData)",
  "source": {
    "path": "flex/public/tidy3d/tidy3d/components/microwave/data/monitor_data.py",
    "url": "",
    "lineno": 550,
    "endlineno": 611
  },
  "bases": [
    "MicrowaveModeDataBase",
    "ModeData"
  ],
  "parameter_rows": [
    {
      "name": "monitor",
      "annotation": "MicrowaveModeMonitor",
      "default": "",
      "description": "Mode monitor associated with the data.",
      "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": "Ex",
      "annotation": "ScalarModeFieldDataArray | None",
      "default": "None",
      "description": "Spatial distribution of the x-component of the electric field of the mode.",
      "origin": "inherited"
    },
    {
      "name": "Ey",
      "annotation": "ScalarModeFieldDataArray | None",
      "default": "None",
      "description": "Spatial distribution of the y-component of the electric field of the mode.",
      "origin": "inherited"
    },
    {
      "name": "Ez",
      "annotation": "ScalarModeFieldDataArray | None",
      "default": "None",
      "description": "Spatial distribution of the z-component of the electric field of the mode.",
      "origin": "inherited"
    },
    {
      "name": "Hx",
      "annotation": "ScalarModeFieldDataArray | None",
      "default": "None",
      "description": "Spatial distribution of the x-component of the magnetic field of the mode.",
      "origin": "inherited"
    },
    {
      "name": "Hy",
      "annotation": "ScalarModeFieldDataArray | None",
      "default": "None",
      "description": "Spatial distribution of the y-component of the magnetic field of the mode.",
      "origin": "inherited"
    },
    {
      "name": "Hz",
      "annotation": "ScalarModeFieldDataArray | None",
      "default": "None",
      "description": "Spatial distribution of the z-component of the magnetic field of the mode.",
      "origin": "inherited"
    },
    {
      "name": "symmetry",
      "annotation": "tuple[Symmetry, Symmetry, Symmetry]",
      "default": "(0, 0, 0)",
      "description": "Symmetry eigenvalues of the original simulation in x, y, and z.",
      "origin": "inherited"
    },
    {
      "name": "symmetry_center",
      "annotation": "Coordinate | None",
      "default": "None",
      "description": "Center of the symmetry planes of the original simulation in x, y, and z. Required only if any of the `symmetry` field are non-zero.",
      "origin": "inherited"
    },
    {
      "name": "grid_expanded",
      "annotation": "Grid | None",
      "default": "None",
      "description": "`Grid` discretization of the associated monitor in the simulation which created the data. Required if symmetries are present, as well as in order to use some functionalities like getting Poynting vector and flux.",
      "origin": "inherited"
    },
    {
      "name": "grid_primal_correction",
      "annotation": "GRID_CORRECTION_TYPE",
      "default": "1.0",
      "description": "Correction factor that needs to be applied for data corresponding to a 2D monitor to take into account the finite grid in the normal direction in the simulation in which the data was computed. The factor is applied to fields defined on the primal grid locations along the normal direction.",
      "origin": "inherited"
    },
    {
      "name": "grid_dual_correction",
      "annotation": "GRID_CORRECTION_TYPE",
      "default": "1.0",
      "description": "Correction factor that needs to be applied for data corresponding to a 2D monitor to take into account the finite grid in the normal direction in the simulation in which the data was computed. The factor is applied to fields defined on the dual grid locations along the normal direction.",
      "origin": "inherited"
    },
    {
      "name": "amps",
      "annotation": "ModeAmpsDataArray",
      "default": "",
      "description": "Complex-valued amplitudes of the overlap decomposition.",
      "origin": "inherited"
    },
    {
      "name": "n_complex",
      "annotation": "ModeIndexDataArray",
      "default": "",
      "description": "Complex-valued effective propagation constants associated with the mode.",
      "origin": "inherited"
    },
    {
      "name": "n_group_raw",
      "annotation": "GroupIndexDataArray | None",
      "default": "None",
      "description": "Index associated with group velocity of the mode.",
      "origin": "inherited"
    },
    {
      "name": "dispersion_raw",
      "annotation": "ModeDispersionDataArray | None",
      "default": "None",
      "description": "Dispersion parameter for the mode.",
      "origin": "inherited"
    },
    {
      "name": "eps_spec",
      "annotation": "list[EpsSpecType] | None",
      "default": "None",
      "description": "Characterization of the permittivity profile on the plane where modes are computed. Possible values are 'diagonal', 'tensorial_real', 'tensorial_complex'.",
      "origin": "inherited"
    },
    {
      "name": "transmission_line_data",
      "annotation": "TransmissionLineDataset | None",
      "default": "None",
      "description": "Additional data relevant to transmission lines in RF and microwave applications, like characteristic impedance. This field is populated when a `MicrowaveModeSpec` has been used to set up the monitor or mode solver.",
      "origin": "inherited"
    },
    {
      "name": "transmission_line_terminal_data",
      "annotation": "TransmissionLineTerminalDataset | None",
      "default": "None",
      "description": "Additional data relevant to transmission line terminals in RF and microwave applications, like characteristic impedance, voltage transformation matrix, and current transformation matrix. This field is populated when a `MicrowaveTerminalModeSpec` has been used to set up the monitor or mode solver.",
      "origin": "inherited"
    }
  ],
  "members": [],
  "group": "flex_rf.tidy3d"
}
