{
  "title": "MicrowaveModeSolverData",
  "public_path": "flex_rf.tidy3d.MicrowaveModeSolverData",
  "lookup_path": "tidy3d.rf.MicrowaveModeSolverData",
  "slug": "flex_rf/tidy3d/MicrowaveModeSolverData",
  "public_url": "/rf/latest/autogenerated/flex_rf/tidy3d/microwavemodesolverdata/",
  "object_kind": "class",
  "introduction": "Data associated with a `ModeSolverMonitor` for microwave and RF applications: scalar components\nof E and H fields plus characteristic impedance data.",
  "notes": "This class extends `ModeSolverData` with\nadditional 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 solver data contains all field components (Ex, Ey, Ez, Hx, Hy, Hz) and\neffective indices from `ModeSolverData`, plus\nimpedance calculations performed using\nvoltage and current line integrals as specified in the `MicrowaveModeSpec`.",
  "examples": "```python\nimport tidy3d as td\nimport numpy as np\nfrom tidy3d import Grid, Coords\nfrom tidy3d.components.data.data_array import (\n    CurrentFreqModeDataArray,\n    ImpedanceFreqModeDataArray,\n    ScalarModeFieldDataArray,\n    ModeIndexDataArray,\n    VoltageFreqModeDataArray,\n)\nfrom tidy3d.components.microwave.data.dataset import TransmissionLineDataset\nx = [-1, 1, 3]\ny = [-2, 0]\nz = [-3, -1, 1, 3, 5]\nf = [2e14, 3e14]\nmode_index = np.arange(3)\ngrid = Grid(boundaries=Coords(x=x, y=y, z=z))\nfield_coords = dict(x=x[:-1], y=y[:-1], z=z[:-1], f=f, mode_index=mode_index)\nfield = ScalarModeFieldDataArray((1+1j)*np.random.random((2,1,4,2,3)), coords=field_coords)\nindex_coords = dict(f=f, mode_index=mode_index)\nindex_data = ModeIndexDataArray((1+1j) * np.random.random((2,3)), coords=index_coords)\nimpedance_data = ImpedanceFreqModeDataArray(50 * np.ones((2, 3)), coords=index_coords)\nvoltage_data = VoltageFreqModeDataArray((1+1j) * np.random.random((2, 3)), coords=index_coords)\ncurrent_data = CurrentFreqModeDataArray((0.02+0.01j) * np.random.random((2, 3)), coords=index_coords)\ntl_data = TransmissionLineDataset(\n    Z0=impedance_data,\n    voltage_coeffs=voltage_data,\n    current_coeffs=current_data\n)\nmonitor = td.MicrowaveModeSolverMonitor(\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_solver',\n)\ndata = MicrowaveModeSolverData(\n    monitor=monitor,\n    Ex=field,\n    Ey=field,\n    Ez=field,\n    Hx=field,\n    Hy=field,\n    Hz=field,\n    n_complex=index_data,\n    grid_expanded=grid,\n    transmission_line_data=tl_data\n)\n```",
  "references": "",
  "signature": "class MicrowaveModeSolverData(MicrowaveModeDataBase, ModeSolverData)",
  "source": {
    "path": "flex/public/tidy3d/tidy3d/components/microwave/data/monitor_data.py",
    "url": "",
    "lineno": 614,
    "endlineno": 774
  },
  "bases": [
    "MicrowaveModeDataBase",
    "ModeSolverData"
  ],
  "parameter_rows": [
    {
      "name": "monitor",
      "annotation": "MicrowaveModeSolverMonitor",
      "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 | None",
      "default": "None",
      "description": "Unused for ModeSolverData.",
      "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": "grid_distances_primal",
      "annotation": "tuple[float] | tuple[float, float]",
      "default": "(0.0,)",
      "description": "Relative distances to the primal grid locations along the normal direction in the original simulation grid. Needed to recalculate grid corrections after interpolating in frequency.",
      "origin": "inherited"
    },
    {
      "name": "grid_distances_dual",
      "annotation": "tuple[float] | tuple[float, float]",
      "default": "(0.0,)",
      "description": "Relative distances to the dual grid locations along the normal direction in the original simulation grid. Needed to recalculate grid corrections after interpolating in frequency.",
      "origin": "inherited"
    },
    {
      "name": "log",
      "annotation": "str | None",
      "default": "None",
      "description": "A string containing the log information from the mode solver run.",
      "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": [
    {
      "name": "interp_in_freq",
      "kind": "function",
      "signature": "interp_in_freq(freqs: FreqArray, method: Literal['linear', 'cubic', 'poly'] = 'linear', renormalize: bool = True, recalculate_grid_correction: bool = True, assume_sorted: bool = False)",
      "description": "Interpolate mode data to new frequency points."
    }
  ],
  "group": "flex_rf.tidy3d"
}
