tidy3d.plugins.waveguide.RectangularDielectric#

class tidy3d.plugins.waveguide.RectangularDielectric#

Bases: tidy3d.components.base.Tidy3dBaseModel

General rectangular dielectric waveguide

Parameters
  • wavelength (Union[float, ArrayLike_dtype=<class 'float'>_ndim=1]) – [units = um]. Wavelength(s) at which to calculate modes (in μm).

  • core_width (Union[NonNegativeFloat, ArrayLike_dtype=<class 'float'>_ndim=1]) – [units = um]. Core width at the top of the waveguide. If set to an array, defines the widths of adjacent waveguides.

  • core_thickness (NonNegativeFloat) – [units = um]. Thickness of the core layer.

  • core_medium (Union[Medium, CustomMedium, AnisotropicMedium, PECMedium, PoleResidue, Sellmeier, Lorentz, Debye, Drude, Medium2D]) – Medium associated with the core layer.

  • clad_medium (Union[Medium, CustomMedium, AnisotropicMedium, PECMedium, PoleResidue, Sellmeier, Lorentz, Debye, Drude, Medium2D]) – Medium associated with the upper cladding layer.

  • box_medium (Union[Medium, CustomMedium, AnisotropicMedium, PECMedium, PoleResidue, Sellmeier, Lorentz, Debye, Drude, Medium2D] = None) – Medium associated with the lower cladding layer.

  • slab_thickness (NonNegativeFloat = 0.0) – [units = um]. Thickness of the slab for rib geometry.

  • clad_thickness (Optional[NonNegativeFloat] = None) – [units = um]. Domain size above the core layer.

  • box_thickness (Optional[NonNegativeFloat] = None) – [units = um]. Domain size below the core layer.

  • side_margin (Optional[NonNegativeFloat] = None) – [units = um]. Domain size to the sides of the waveguide core.

  • sidewall_angle (float = 0.0) – [units = rad]. Angle of the core sidewalls measured from the vertical direction (in radians). Positive (negative) values create waveguides with bases wider (narrower) than their tops.

  • gap (Union[float, ArrayLike_dtype=<class 'float'>_ndim=1] = 0.0) – [units = um]. Distance between adjacent waveguides, measured at the top core edges. An array can be used to define one gap per pair of adjacent waveguides.

  • sidewall_thickness (NonNegativeFloat = 0.0) – [units = um]. Sidewall layer thickness (within core).

  • sidewall_medium (Union[Medium, CustomMedium, AnisotropicMedium, PECMedium, PoleResidue, Sellmeier, Lorentz, Debye, Drude, Medium2D] = None) – Medium associated with the sidewall layer to model sidewall losses.

  • surface_thickness (NonNegativeFloat = 0.0) – [units = um]. Thickness of the surface layers defined on the top of the waveguide and slab regions (if any).

  • surface_medium (Union[Medium, CustomMedium, AnisotropicMedium, PECMedium, PoleResidue, Sellmeier, Lorentz, Debye, Drude, Medium2D] = None) – Medium associated with the surface layer to model surface losses.

  • origin (Tuple[float, float, float] = (0, 0, 0)) – [units = um]. Center of the waveguide geometry. This coordinate represents the base of the waveguides (substrate surface) in the normal axis, and center of the geometry in the remaining axes.

  • length (NonNegativeFloat = 1e+30) – [units = um]. Length of the waveguides in the propagation direction

  • propagation_axis (Literal[0, 1, 2] = 0) – Axis of propagation of the waveguide

  • normal_axis (Literal[0, 1, 2] = 2) – Axis normal to the substrate surface

  • mode_spec (ModeSpec = ModeSpec(num_modes=2, target_neff=None, num_pml=(0,, 0), filter_pol=None, angle_theta=0.0, angle_phi=0.0, precision='double', bend_radius=None, bend_axis=None, track_freq='central', group_index_step=False, type='ModeSpec')) – ModeSpec defining waveguide mode properties.

  • grid_resolution (int = 15) – Solver grid resolution per wavelength.

  • max_grid_scaling (float = 1.2) – Maximal size increase between adjacent grid boundaries.

  • Supports

  • geometries (- Strip and rib) –

  • sidewalls (- Angled) –

  • bends (- Modes in waveguide) –

  • models (- Surface and sidewall loss) –

  • waveguides (- Coupled) –

Show JSON schema
{
   "title": "RectangularDielectric",
   "description": "General rectangular dielectric waveguide\n\nParameters\n----------\nwavelength : Union[float, ArrayLike_dtype=<class 'float'>_ndim=1]\n    [units = um].  Wavelength(s) at which to calculate modes (in \u03bcm).\ncore_width : Union[NonNegativeFloat, ArrayLike_dtype=<class 'float'>_ndim=1]\n    [units = um].  Core width at the top of the waveguide.  If set to an array, defines the widths of adjacent waveguides.\ncore_thickness : NonNegativeFloat\n    [units = um].  Thickness of the core layer.\ncore_medium : Union[Medium, CustomMedium, AnisotropicMedium, PECMedium, PoleResidue, Sellmeier, Lorentz, Debye, Drude, Medium2D]\n    Medium associated with the core layer.\nclad_medium : Union[Medium, CustomMedium, AnisotropicMedium, PECMedium, PoleResidue, Sellmeier, Lorentz, Debye, Drude, Medium2D]\n    Medium associated with the upper cladding layer.\nbox_medium : Union[Medium, CustomMedium, AnisotropicMedium, PECMedium, PoleResidue, Sellmeier, Lorentz, Debye, Drude, Medium2D] = None\n    Medium associated with the lower cladding layer.\nslab_thickness : NonNegativeFloat = 0.0\n    [units = um].  Thickness of the slab for rib geometry.\nclad_thickness : Optional[NonNegativeFloat] = None\n    [units = um].  Domain size above the core layer.\nbox_thickness : Optional[NonNegativeFloat] = None\n    [units = um].  Domain size below the core layer.\nside_margin : Optional[NonNegativeFloat] = None\n    [units = um].  Domain size to the sides of the waveguide core.\nsidewall_angle : float = 0.0\n    [units = rad].  Angle of the core sidewalls measured from the vertical direction (in radians).  Positive (negative) values create waveguides with bases wider (narrower) than their tops.\ngap : Union[float, ArrayLike_dtype=<class 'float'>_ndim=1] = 0.0\n    [units = um].  Distance between adjacent waveguides, measured at the top core edges.  An array can be used to define one gap per pair of adjacent waveguides.\nsidewall_thickness : NonNegativeFloat = 0.0\n    [units = um].  Sidewall layer thickness (within core).\nsidewall_medium : Union[Medium, CustomMedium, AnisotropicMedium, PECMedium, PoleResidue, Sellmeier, Lorentz, Debye, Drude, Medium2D] = None\n    Medium associated with the sidewall layer to model sidewall losses.\nsurface_thickness : NonNegativeFloat = 0.0\n    [units = um].  Thickness of the surface layers defined on the top of the waveguide and  slab regions (if any).\nsurface_medium : Union[Medium, CustomMedium, AnisotropicMedium, PECMedium, PoleResidue, Sellmeier, Lorentz, Debye, Drude, Medium2D] = None\n    Medium associated with the surface layer to model surface losses.\norigin : Tuple[float, float, float] = (0, 0, 0)\n    [units = um].  Center of the waveguide geometry.  This coordinate represents the base of the waveguides (substrate surface) in the normal axis, and center of the geometry in the remaining axes.\nlength : NonNegativeFloat = 1e+30\n    [units = um].  Length of the waveguides in the propagation direction\npropagation_axis : Literal[0, 1, 2] = 0\n    Axis of propagation of the waveguide\nnormal_axis : Literal[0, 1, 2] = 2\n    Axis normal to the substrate surface\nmode_spec : ModeSpec = ModeSpec(num_modes=2, target_neff=None, num_pml=(0,, 0), filter_pol=None, angle_theta=0.0, angle_phi=0.0, precision='double', bend_radius=None, bend_axis=None, track_freq='central', group_index_step=False, type='ModeSpec')\n    :class:`ModeSpec` defining waveguide mode properties.\ngrid_resolution : int = 15\n    Solver grid resolution per wavelength.\nmax_grid_scaling : float = 1.2\n    Maximal size increase between adjacent grid boundaries.\n\nSupports:\n- Strip and rib geometries\n- Angled sidewalls\n- Modes in waveguide bends\n- Surface and sidewall loss models\n- Coupled waveguides",
   "type": "object",
   "properties": {
      "wavelength": {
         "title": "Wavelength",
         "description": "Wavelength(s) at which to calculate modes (in \u03bcm).",
         "units": "um",
         "anyOf": [
            {
               "type": "number"
            },
            {
               "title": "ArrayLike",
               "type": "ArrayLike"
            }
         ]
      },
      "core_width": {
         "title": "Core width",
         "description": "Core width at the top of the waveguide.  If set to an array, defines the widths of adjacent waveguides.",
         "units": "um",
         "anyOf": [
            {
               "type": "number",
               "minimum": 0
            },
            {
               "title": "ArrayLike",
               "type": "ArrayLike"
            }
         ]
      },
      "core_thickness": {
         "title": "Core Thickness",
         "description": "Thickness of the core layer.",
         "units": "um",
         "minimum": 0,
         "type": "number"
      },
      "core_medium": {
         "title": "Core Medium",
         "description": "Medium associated with the core layer.",
         "anyOf": [
            {
               "$ref": "#/definitions/Medium"
            },
            {
               "$ref": "#/definitions/CustomMedium"
            },
            {
               "$ref": "#/definitions/AnisotropicMedium"
            },
            {
               "$ref": "#/definitions/PECMedium"
            },
            {
               "$ref": "#/definitions/PoleResidue"
            },
            {
               "$ref": "#/definitions/Sellmeier"
            },
            {
               "$ref": "#/definitions/Lorentz"
            },
            {
               "$ref": "#/definitions/Debye"
            },
            {
               "$ref": "#/definitions/Drude"
            },
            {
               "$ref": "#/definitions/Medium2D"
            }
         ]
      },
      "clad_medium": {
         "title": "Clad Medium",
         "description": "Medium associated with the upper cladding layer.",
         "anyOf": [
            {
               "$ref": "#/definitions/Medium"
            },
            {
               "$ref": "#/definitions/CustomMedium"
            },
            {
               "$ref": "#/definitions/AnisotropicMedium"
            },
            {
               "$ref": "#/definitions/PECMedium"
            },
            {
               "$ref": "#/definitions/PoleResidue"
            },
            {
               "$ref": "#/definitions/Sellmeier"
            },
            {
               "$ref": "#/definitions/Lorentz"
            },
            {
               "$ref": "#/definitions/Debye"
            },
            {
               "$ref": "#/definitions/Drude"
            },
            {
               "$ref": "#/definitions/Medium2D"
            }
         ]
      },
      "box_medium": {
         "title": "Box Medium",
         "description": "Medium associated with the lower cladding layer.",
         "anyOf": [
            {
               "$ref": "#/definitions/Medium"
            },
            {
               "$ref": "#/definitions/CustomMedium"
            },
            {
               "$ref": "#/definitions/AnisotropicMedium"
            },
            {
               "$ref": "#/definitions/PECMedium"
            },
            {
               "$ref": "#/definitions/PoleResidue"
            },
            {
               "$ref": "#/definitions/Sellmeier"
            },
            {
               "$ref": "#/definitions/Lorentz"
            },
            {
               "$ref": "#/definitions/Debye"
            },
            {
               "$ref": "#/definitions/Drude"
            },
            {
               "$ref": "#/definitions/Medium2D"
            }
         ]
      },
      "slab_thickness": {
         "title": "Slab Thickness",
         "description": "Thickness of the slab for rib geometry.",
         "default": 0.0,
         "units": "um",
         "minimum": 0,
         "type": "number"
      },
      "clad_thickness": {
         "title": "Clad Thickness",
         "description": "Domain size above the core layer.",
         "units": "um",
         "minimum": 0,
         "type": "number"
      },
      "box_thickness": {
         "title": "Box Thickness",
         "description": "Domain size below the core layer.",
         "units": "um",
         "minimum": 0,
         "type": "number"
      },
      "side_margin": {
         "title": "Side Margin",
         "description": "Domain size to the sides of the waveguide core.",
         "units": "um",
         "minimum": 0,
         "type": "number"
      },
      "sidewall_angle": {
         "title": "Sidewall Angle",
         "description": "Angle of the core sidewalls measured from the vertical direction (in radians).  Positive (negative) values create waveguides with bases wider (narrower) than their tops.",
         "default": 0.0,
         "units": "rad",
         "type": "number"
      },
      "gap": {
         "title": "Gap",
         "description": "Distance between adjacent waveguides, measured at the top core edges.  An array can be used to define one gap per pair of adjacent waveguides.",
         "default": 0.0,
         "units": "um",
         "anyOf": [
            {
               "type": "number"
            },
            {
               "title": "ArrayLike",
               "type": "ArrayLike"
            }
         ]
      },
      "sidewall_thickness": {
         "title": "Sidewall Thickness",
         "description": "Sidewall layer thickness (within core).",
         "default": 0.0,
         "units": "um",
         "minimum": 0,
         "type": "number"
      },
      "sidewall_medium": {
         "title": "Sidewall medium",
         "description": "Medium associated with the sidewall layer to model sidewall losses.",
         "anyOf": [
            {
               "$ref": "#/definitions/Medium"
            },
            {
               "$ref": "#/definitions/CustomMedium"
            },
            {
               "$ref": "#/definitions/AnisotropicMedium"
            },
            {
               "$ref": "#/definitions/PECMedium"
            },
            {
               "$ref": "#/definitions/PoleResidue"
            },
            {
               "$ref": "#/definitions/Sellmeier"
            },
            {
               "$ref": "#/definitions/Lorentz"
            },
            {
               "$ref": "#/definitions/Debye"
            },
            {
               "$ref": "#/definitions/Drude"
            },
            {
               "$ref": "#/definitions/Medium2D"
            }
         ]
      },
      "surface_thickness": {
         "title": "Surface Thickness",
         "description": "Thickness of the surface layers defined on the top of the waveguide and  slab regions (if any).",
         "default": 0.0,
         "units": "um",
         "minimum": 0,
         "type": "number"
      },
      "surface_medium": {
         "title": "Surface Medium",
         "description": "Medium associated with the surface layer to model surface losses.",
         "anyOf": [
            {
               "$ref": "#/definitions/Medium"
            },
            {
               "$ref": "#/definitions/CustomMedium"
            },
            {
               "$ref": "#/definitions/AnisotropicMedium"
            },
            {
               "$ref": "#/definitions/PECMedium"
            },
            {
               "$ref": "#/definitions/PoleResidue"
            },
            {
               "$ref": "#/definitions/Sellmeier"
            },
            {
               "$ref": "#/definitions/Lorentz"
            },
            {
               "$ref": "#/definitions/Debye"
            },
            {
               "$ref": "#/definitions/Drude"
            },
            {
               "$ref": "#/definitions/Medium2D"
            }
         ]
      },
      "origin": {
         "title": "Origin",
         "description": "Center of the waveguide geometry.  This coordinate represents the base of the waveguides (substrate surface) in the normal axis, and center of the geometry in the remaining axes.",
         "default": [
            0,
            0,
            0
         ],
         "units": "um",
         "type": "array",
         "minItems": 3,
         "maxItems": 3,
         "items": [
            {
               "type": "number"
            },
            {
               "type": "number"
            },
            {
               "type": "number"
            }
         ]
      },
      "length": {
         "title": "Length",
         "description": "Length of the waveguides in the propagation direction",
         "default": 1e+30,
         "units": "um",
         "minimum": 0,
         "type": "number"
      },
      "propagation_axis": {
         "title": "Propagation Axis",
         "description": "Axis of propagation of the waveguide",
         "default": 0,
         "enum": [
            0,
            1,
            2
         ],
         "type": "integer"
      },
      "normal_axis": {
         "title": "Normal Axis",
         "description": "Axis normal to the substrate surface",
         "default": 2,
         "enum": [
            0,
            1,
            2
         ],
         "type": "integer"
      },
      "mode_spec": {
         "title": "Mode Specification",
         "description": ":class:`ModeSpec` defining waveguide mode properties.",
         "default": {
            "num_modes": 2,
            "target_neff": null,
            "num_pml": [
               0,
               0
            ],
            "filter_pol": null,
            "angle_theta": 0.0,
            "angle_phi": 0.0,
            "precision": "double",
            "bend_radius": null,
            "bend_axis": null,
            "track_freq": "central",
            "group_index_step": false,
            "type": "ModeSpec"
         },
         "allOf": [
            {
               "$ref": "#/definitions/ModeSpec"
            }
         ]
      },
      "grid_resolution": {
         "title": "Grid Resolution",
         "description": "Solver grid resolution per wavelength.",
         "default": 15,
         "type": "integer"
      },
      "max_grid_scaling": {
         "title": "Maximal Grid Scaling",
         "description": "Maximal size increase between adjacent grid boundaries.",
         "default": 1.2,
         "type": "number"
      },
      "type": {
         "title": "Type",
         "default": "RectangularDielectric",
         "enum": [
            "RectangularDielectric"
         ],
         "type": "string"
      }
   },
   "required": [
      "wavelength",
      "core_width",
      "core_thickness",
      "core_medium",
      "clad_medium"
   ],
   "additionalProperties": false,
   "definitions": {
      "Medium": {
         "title": "Medium",
         "description": "Dispersionless medium.\n\nParameters\n----------\nname : Optional[str] = None\n    Optional unique name for medium.\nfrequency_range : Optional[Tuple[float, float]] = None\n    [units = (Hz, Hz)].  Optional range of validity for the medium.\npermittivity : ConstrainedFloatValue = 1.0\n    [units = None (relative permittivity)].  Relative permittivity.\nconductivity : ConstrainedFloatValue = 0.0\n    [units = S/um].  Electric conductivity.  Defined such that the imaginary part of the complex permittivity at angular frequency omega is given by conductivity/omega.\n\nExample\n-------\n>>> dielectric = Medium(permittivity=4.0, name='my_medium')\n>>> eps = dielectric.eps_model(200e12)",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "Optional unique name for medium.",
               "type": "string"
            },
            "frequency_range": {
               "title": "Frequency Range",
               "description": "Optional range of validity for the medium.",
               "units": [
                  "Hz",
                  "Hz"
               ],
               "type": "array",
               "minItems": 2,
               "maxItems": 2,
               "items": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "number"
                  }
               ]
            },
            "type": {
               "title": "Type",
               "default": "Medium",
               "enum": [
                  "Medium"
               ],
               "type": "string"
            },
            "permittivity": {
               "title": "Permittivity",
               "description": "Relative permittivity.",
               "default": 1.0,
               "minimum": 1.0,
               "units": "None (relative permittivity)",
               "type": "number"
            },
            "conductivity": {
               "title": "Conductivity",
               "description": "Electric conductivity.  Defined such that the imaginary part of the complex permittivity at angular frequency omega is given by conductivity/omega.",
               "default": 0.0,
               "minimum": 0.0,
               "units": "S/um",
               "type": "number"
            }
         },
         "additionalProperties": false
      },
      "PermittivityDataset": {
         "title": "PermittivityDataset",
         "description": "Dataset storing the diagonal components of the permittivity tensor.\n\nParameters\n----------\neps_xx : ScalarFieldDataArray\n    Spatial distribution of the xx-component of the relative permittivity.\neps_yy : ScalarFieldDataArray\n    Spatial distribution of the yy-component of the relative permittivity.\neps_zz : ScalarFieldDataArray\n    Spatial distribution of the zz-component of the relative permittivity.\n\nExample\n-------\n>>> x = [-1,1]\n>>> y = [-2,0,2]\n>>> z = [-3,-1,1,3]\n>>> f = [2e14, 3e14]\n>>> coords = dict(x=x, y=y, z=z, f=f)\n>>> sclr_fld = ScalarFieldDataArray((1+1j) * np.random.random((2,3,4,2)), coords=coords)\n>>> data = PermittivityDataset(eps_xx=sclr_fld, eps_yy=sclr_fld, eps_zz=sclr_fld)",
         "type": "object",
         "properties": {
            "type": {
               "title": "Type",
               "default": "PermittivityDataset",
               "enum": [
                  "PermittivityDataset"
               ],
               "type": "string"
            },
            "eps_xx": {
               "title": "DataArray",
               "description": "Spatial distribution of the xx-component of the relative permittivity.",
               "type": "xr.DataArray",
               "properties": {
                  "_dims": {
                     "title": "_dims",
                     "type": "Tuple[str, ...]"
                  }
               },
               "required": [
                  "_dims"
               ]
            },
            "eps_yy": {
               "title": "DataArray",
               "description": "Spatial distribution of the yy-component of the relative permittivity.",
               "type": "xr.DataArray",
               "properties": {
                  "_dims": {
                     "title": "_dims",
                     "type": "Tuple[str, ...]"
                  }
               },
               "required": [
                  "_dims"
               ]
            },
            "eps_zz": {
               "title": "DataArray",
               "description": "Spatial distribution of the zz-component of the relative permittivity.",
               "type": "xr.DataArray",
               "properties": {
                  "_dims": {
                     "title": "_dims",
                     "type": "Tuple[str, ...]"
                  }
               },
               "required": [
                  "_dims"
               ]
            }
         },
         "required": [
            "eps_xx",
            "eps_yy",
            "eps_zz"
         ],
         "additionalProperties": false
      },
      "CustomMedium": {
         "title": "CustomMedium",
         "description": ":class:`.Medium` with user-supplied permittivity distribution.\n\nParameters\n----------\nname : Optional[str] = None\n    Optional unique name for medium.\nfrequency_range : Optional[Tuple[float, float]] = None\n    [units = (Hz, Hz)].  Optional range of validity for the medium.\neps_dataset : PermittivityDataset\n    User-supplied dataset containing complex-valued permittivity as a function of space. Permittivity distribution over the Yee-grid will be interpolated based on ``interp_method``.\ninterp_method : Literal['nearest', 'linear'] = nearest\n    Interpolation method to obtain permittivity values that are not supplied at the Yee grids; For grids outside the range of the supplied data, extrapolation will be applied. When the extrapolated value is smaller (greater) than the minimal (maximal) of the supplied data, the extrapolated value will take the minimal (maximal) of the supplied data.\n\nExample\n-------\n>>> Nx, Ny, Nz = 10, 9, 8\n>>> X = np.linspace(-1, 1, Nx)\n>>> Y = np.linspace(-1, 1, Ny)\n>>> Z = np.linspace(-1, 1, Nz)\n>>> freqs = [2e14]\n>>> data = np.ones((Nx, Ny, Nz, 1))\n>>> eps_diagonal_data = ScalarFieldDataArray(data, coords=dict(x=X, y=Y, z=Z, f=freqs))\n>>> eps_components = {f\"eps_{d}{d}\": eps_diagonal_data for d in \"xyz\"}\n>>> eps_dataset = PermittivityDataset(**eps_components)\n>>> dielectric = CustomMedium(eps_dataset=eps_dataset, name='my_medium')\n>>> eps = dielectric.eps_model(200e12)",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "Optional unique name for medium.",
               "type": "string"
            },
            "frequency_range": {
               "title": "Frequency Range",
               "description": "Optional range of validity for the medium.",
               "units": [
                  "Hz",
                  "Hz"
               ],
               "type": "array",
               "minItems": 2,
               "maxItems": 2,
               "items": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "number"
                  }
               ]
            },
            "type": {
               "title": "Type",
               "default": "CustomMedium",
               "enum": [
                  "CustomMedium"
               ],
               "type": "string"
            },
            "eps_dataset": {
               "title": "Permittivity Dataset",
               "description": "User-supplied dataset containing complex-valued permittivity as a function of space. Permittivity distribution over the Yee-grid will be interpolated based on ``interp_method``.",
               "allOf": [
                  {
                     "$ref": "#/definitions/PermittivityDataset"
                  }
               ]
            },
            "interp_method": {
               "title": "Interpolation method",
               "description": "Interpolation method to obtain permittivity values that are not supplied at the Yee grids; For grids outside the range of the supplied data, extrapolation will be applied. When the extrapolated value is smaller (greater) than the minimal (maximal) of the supplied data, the extrapolated value will take the minimal (maximal) of the supplied data.",
               "default": "nearest",
               "enum": [
                  "nearest",
                  "linear"
               ],
               "type": "string"
            }
         },
         "required": [
            "eps_dataset"
         ],
         "additionalProperties": false
      },
      "ComplexNumber": {
         "title": "ComplexNumber",
         "description": "Complex number with a well defined schema.",
         "type": "object",
         "properties": {
            "real": {
               "title": "Real",
               "type": "number"
            },
            "imag": {
               "title": "Imag",
               "type": "number"
            }
         },
         "required": [
            "real",
            "imag"
         ]
      },
      "PoleResidue": {
         "title": "PoleResidue",
         "description": "A dispersive medium described by the pole-residue pair model.\nThe frequency-dependence of the complex-valued permittivity is described by:\n\nParameters\n----------\nname : Optional[str] = None\n    Optional unique name for medium.\nfrequency_range : Optional[Tuple[float, float]] = None\n    [units = (Hz, Hz)].  Optional range of validity for the medium.\neps_inf : PositiveFloat = 1.0\n    [units = None (relative permittivity)].  Relative permittivity at infinite frequency (:math:`\\epsilon_\\infty`).\npoles : Tuple[Tuple[Union[tidy3d.components.types.tidycomplex, tidy3d.components.types.ComplexNumber], Union[tidy3d.components.types.tidycomplex, tidy3d.components.types.ComplexNumber]], ...] = ()\n    [units = (rad/sec, rad/sec)].  Tuple of complex-valued (:math:`a_i, c_i`) poles for the model.\n\nNote\n----\n.. math::\n\n    \\epsilon(\\omega) = \\epsilon_\\infty - \\sum_i\n    \\left[\\frac{c_i}{j \\omega + a_i} +\n    \\frac{c_i^*}{j \\omega + a_i^*}\\right]\n\nExample\n-------\n>>> pole_res = PoleResidue(eps_inf=2.0, poles=[((1+2j), (3+4j)), ((5+6j), (7+8j))])\n>>> eps = pole_res.eps_model(200e12)",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "Optional unique name for medium.",
               "type": "string"
            },
            "frequency_range": {
               "title": "Frequency Range",
               "description": "Optional range of validity for the medium.",
               "units": [
                  "Hz",
                  "Hz"
               ],
               "type": "array",
               "minItems": 2,
               "maxItems": 2,
               "items": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "number"
                  }
               ]
            },
            "type": {
               "title": "Type",
               "default": "PoleResidue",
               "enum": [
                  "PoleResidue"
               ],
               "type": "string"
            },
            "eps_inf": {
               "title": "Epsilon at Infinity",
               "description": "Relative permittivity at infinite frequency (:math:`\\epsilon_\\infty`).",
               "default": 1.0,
               "units": "None (relative permittivity)",
               "exclusiveMinimum": 0,
               "type": "number"
            },
            "poles": {
               "title": "Poles",
               "description": "Tuple of complex-valued (:math:`a_i, c_i`) poles for the model.",
               "default": [],
               "units": [
                  "rad/sec",
                  "rad/sec"
               ],
               "type": "array",
               "items": {
                  "type": "array",
                  "minItems": 2,
                  "maxItems": 2,
                  "items": [
                     {
                        "anyOf": [
                           {
                              "title": "ComplexNumber",
                              "description": "Complex number with a well defined schema.",
                              "type": "object",
                              "properties": {
                                 "real": {
                                    "title": "Real",
                                    "type": "number"
                                 },
                                 "imag": {
                                    "title": "Imag",
                                    "type": "number"
                                 }
                              },
                              "required": [
                                 "real",
                                 "imag"
                              ]
                           },
                           {
                              "$ref": "#/definitions/ComplexNumber"
                           }
                        ]
                     },
                     {
                        "anyOf": [
                           {
                              "title": "ComplexNumber",
                              "description": "Complex number with a well defined schema.",
                              "type": "object",
                              "properties": {
                                 "real": {
                                    "title": "Real",
                                    "type": "number"
                                 },
                                 "imag": {
                                    "title": "Imag",
                                    "type": "number"
                                 }
                              },
                              "required": [
                                 "real",
                                 "imag"
                              ]
                           },
                           {
                              "$ref": "#/definitions/ComplexNumber"
                           }
                        ]
                     }
                  ]
               }
            }
         },
         "additionalProperties": false
      },
      "Sellmeier": {
         "title": "Sellmeier",
         "description": "A dispersive medium described by the Sellmeier model.\nThe frequency-dependence of the refractive index is described by:\n\nParameters\n----------\nname : Optional[str] = None\n    Optional unique name for medium.\nfrequency_range : Optional[Tuple[float, float]] = None\n    [units = (Hz, Hz)].  Optional range of validity for the medium.\ncoeffs : Tuple[Tuple[float, pydantic.types.PositiveFloat], ...]\n    [units = (None, um^2)].  List of Sellmeier (:math:`B_i, C_i`) coefficients.\n\nNote\n----\n.. math::\n\n    n(\\lambda)^2 = 1 + \\sum_i \\frac{B_i \\lambda^2}{\\lambda^2 - C_i}\n\nExample\n-------\n>>> sellmeier_medium = Sellmeier(coeffs=[(1,2), (3,4)])\n>>> eps = sellmeier_medium.eps_model(200e12)",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "Optional unique name for medium.",
               "type": "string"
            },
            "frequency_range": {
               "title": "Frequency Range",
               "description": "Optional range of validity for the medium.",
               "units": [
                  "Hz",
                  "Hz"
               ],
               "type": "array",
               "minItems": 2,
               "maxItems": 2,
               "items": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "number"
                  }
               ]
            },
            "type": {
               "title": "Type",
               "default": "Sellmeier",
               "enum": [
                  "Sellmeier"
               ],
               "type": "string"
            },
            "coeffs": {
               "title": "Coefficients",
               "description": "List of Sellmeier (:math:`B_i, C_i`) coefficients.",
               "units": [
                  null,
                  "um^2"
               ],
               "type": "array",
               "items": {
                  "type": "array",
                  "minItems": 2,
                  "maxItems": 2,
                  "items": [
                     {
                        "type": "number"
                     },
                     {
                        "type": "number",
                        "exclusiveMinimum": 0
                     }
                  ]
               }
            }
         },
         "required": [
            "coeffs"
         ],
         "additionalProperties": false
      },
      "Lorentz": {
         "title": "Lorentz",
         "description": "A dispersive medium described by the Lorentz model.\nThe frequency-dependence of the complex-valued permittivity is described by:\n\nParameters\n----------\nname : Optional[str] = None\n    Optional unique name for medium.\nfrequency_range : Optional[Tuple[float, float]] = None\n    [units = (Hz, Hz)].  Optional range of validity for the medium.\neps_inf : PositiveFloat = 1.0\n    [units = None (relative permittivity)].  Relative permittivity at infinite frequency (:math:`\\epsilon_\\infty`).\ncoeffs : Tuple[Tuple[float, float, float], ...]\n    [units = (None (relative permittivity), Hz, Hz)].  List of (:math:`\\Delta\\epsilon_i, f_i, \\delta_i`) values for model.\n\nNote\n----\n.. math::\n\n    \\epsilon(f) = \\epsilon_\\infty + \\sum_i\n    \\frac{\\Delta\\epsilon_i f_i^2}{f_i^2 - 2jf\\delta_i - f^2}\n\nExample\n-------\n>>> lorentz_medium = Lorentz(eps_inf=2.0, coeffs=[(1,2,3), (4,5,6)])\n>>> eps = lorentz_medium.eps_model(200e12)",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "Optional unique name for medium.",
               "type": "string"
            },
            "frequency_range": {
               "title": "Frequency Range",
               "description": "Optional range of validity for the medium.",
               "units": [
                  "Hz",
                  "Hz"
               ],
               "type": "array",
               "minItems": 2,
               "maxItems": 2,
               "items": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "number"
                  }
               ]
            },
            "type": {
               "title": "Type",
               "default": "Lorentz",
               "enum": [
                  "Lorentz"
               ],
               "type": "string"
            },
            "eps_inf": {
               "title": "Epsilon at Infinity",
               "description": "Relative permittivity at infinite frequency (:math:`\\epsilon_\\infty`).",
               "default": 1.0,
               "units": "None (relative permittivity)",
               "exclusiveMinimum": 0,
               "type": "number"
            },
            "coeffs": {
               "title": "Coefficients",
               "description": "List of (:math:`\\Delta\\epsilon_i, f_i, \\delta_i`) values for model.",
               "units": [
                  "None (relative permittivity)",
                  "Hz",
                  "Hz"
               ],
               "type": "array",
               "items": {
                  "type": "array",
                  "minItems": 3,
                  "maxItems": 3,
                  "items": [
                     {
                        "type": "number"
                     },
                     {
                        "type": "number"
                     },
                     {
                        "type": "number"
                     }
                  ]
               }
            }
         },
         "required": [
            "coeffs"
         ],
         "additionalProperties": false
      },
      "Debye": {
         "title": "Debye",
         "description": "A dispersive medium described by the Debye model.\nThe frequency-dependence of the complex-valued permittivity is described by:\n\nParameters\n----------\nname : Optional[str] = None\n    Optional unique name for medium.\nfrequency_range : Optional[Tuple[float, float]] = None\n    [units = (Hz, Hz)].  Optional range of validity for the medium.\neps_inf : PositiveFloat = 1.0\n    [units = None (relative permittivity)].  Relative permittivity at infinite frequency (:math:`\\epsilon_\\infty`).\ncoeffs : Tuple[Tuple[float, pydantic.types.PositiveFloat], ...]\n    [units = (None (relative permittivity), sec)].  List of (:math:`\\Delta\\epsilon_i, \\tau_i`) values for model.\n\nNote\n----\n.. math::\n\n    \\epsilon(f) = \\epsilon_\\infty + \\sum_i\n    \\frac{\\Delta\\epsilon_i}{1 - jf\\tau_i}\n\nExample\n-------\n>>> debye_medium = Debye(eps_inf=2.0, coeffs=[(1,2),(3,4)])\n>>> eps = debye_medium.eps_model(200e12)",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "Optional unique name for medium.",
               "type": "string"
            },
            "frequency_range": {
               "title": "Frequency Range",
               "description": "Optional range of validity for the medium.",
               "units": [
                  "Hz",
                  "Hz"
               ],
               "type": "array",
               "minItems": 2,
               "maxItems": 2,
               "items": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "number"
                  }
               ]
            },
            "type": {
               "title": "Type",
               "default": "Debye",
               "enum": [
                  "Debye"
               ],
               "type": "string"
            },
            "eps_inf": {
               "title": "Epsilon at Infinity",
               "description": "Relative permittivity at infinite frequency (:math:`\\epsilon_\\infty`).",
               "default": 1.0,
               "units": "None (relative permittivity)",
               "exclusiveMinimum": 0,
               "type": "number"
            },
            "coeffs": {
               "title": "Coefficients",
               "description": "List of (:math:`\\Delta\\epsilon_i, \\tau_i`) values for model.",
               "units": [
                  "None (relative permittivity)",
                  "sec"
               ],
               "type": "array",
               "items": {
                  "type": "array",
                  "minItems": 2,
                  "maxItems": 2,
                  "items": [
                     {
                        "type": "number"
                     },
                     {
                        "type": "number",
                        "exclusiveMinimum": 0
                     }
                  ]
               }
            }
         },
         "required": [
            "coeffs"
         ],
         "additionalProperties": false
      },
      "Drude": {
         "title": "Drude",
         "description": "A dispersive medium described by the Drude model.\nThe frequency-dependence of the complex-valued permittivity is described by:\n\nParameters\n----------\nname : Optional[str] = None\n    Optional unique name for medium.\nfrequency_range : Optional[Tuple[float, float]] = None\n    [units = (Hz, Hz)].  Optional range of validity for the medium.\neps_inf : PositiveFloat = 1.0\n    [units = None (relative permittivity)].  Relative permittivity at infinite frequency (:math:`\\epsilon_\\infty`).\ncoeffs : Tuple[Tuple[float, pydantic.types.PositiveFloat], ...]\n    [units = (Hz, Hz)].  List of (:math:`f_i, \\delta_i`) values for model.\n\nNote\n----\n.. math::\n\n    \\epsilon(f) = \\epsilon_\\infty - \\sum_i\n    \\frac{ f_i^2}{f^2 + jf\\delta_i}\n\nExample\n-------\n>>> drude_medium = Drude(eps_inf=2.0, coeffs=[(1,2), (3,4)])\n>>> eps = drude_medium.eps_model(200e12)",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "Optional unique name for medium.",
               "type": "string"
            },
            "frequency_range": {
               "title": "Frequency Range",
               "description": "Optional range of validity for the medium.",
               "units": [
                  "Hz",
                  "Hz"
               ],
               "type": "array",
               "minItems": 2,
               "maxItems": 2,
               "items": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "number"
                  }
               ]
            },
            "type": {
               "title": "Type",
               "default": "Drude",
               "enum": [
                  "Drude"
               ],
               "type": "string"
            },
            "eps_inf": {
               "title": "Epsilon at Infinity",
               "description": "Relative permittivity at infinite frequency (:math:`\\epsilon_\\infty`).",
               "default": 1.0,
               "units": "None (relative permittivity)",
               "exclusiveMinimum": 0,
               "type": "number"
            },
            "coeffs": {
               "title": "Coefficients",
               "description": "List of (:math:`f_i, \\delta_i`) values for model.",
               "units": [
                  "Hz",
                  "Hz"
               ],
               "type": "array",
               "items": {
                  "type": "array",
                  "minItems": 2,
                  "maxItems": 2,
                  "items": [
                     {
                        "type": "number"
                     },
                     {
                        "type": "number",
                        "exclusiveMinimum": 0
                     }
                  ]
               }
            }
         },
         "required": [
            "coeffs"
         ],
         "additionalProperties": false
      },
      "AnisotropicMedium": {
         "title": "AnisotropicMedium",
         "description": "Diagonally anisotropic medium.\n\nParameters\n----------\nname : Optional[str] = None\n    Optional unique name for medium.\nfrequency_range : Optional[Tuple[float, float]] = None\n    [units = (Hz, Hz)].  Optional range of validity for the medium.\nxx : Union[Medium, PoleResidue, Sellmeier, Lorentz, Debye, Drude]\n    Medium describing the xx-component of the diagonal permittivity tensor.\nyy : Union[Medium, PoleResidue, Sellmeier, Lorentz, Debye, Drude]\n    Medium describing the yy-component of the diagonal permittivity tensor.\nzz : Union[Medium, PoleResidue, Sellmeier, Lorentz, Debye, Drude]\n    Medium describing the zz-component of the diagonal permittivity tensor.\n\nNote\n----\nOnly diagonal anisotropy is currently supported.\n\nExample\n-------\n>>> medium_xx = Medium(permittivity=4.0)\n>>> medium_yy = Medium(permittivity=4.1)\n>>> medium_zz = Medium(permittivity=3.9)\n>>> anisotropic_dielectric = AnisotropicMedium(xx=medium_xx, yy=medium_yy, zz=medium_zz)",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "Optional unique name for medium.",
               "type": "string"
            },
            "frequency_range": {
               "title": "Frequency Range",
               "description": "Optional range of validity for the medium.",
               "units": [
                  "Hz",
                  "Hz"
               ],
               "type": "array",
               "minItems": 2,
               "maxItems": 2,
               "items": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "number"
                  }
               ]
            },
            "type": {
               "title": "Type",
               "default": "AnisotropicMedium",
               "enum": [
                  "AnisotropicMedium"
               ],
               "type": "string"
            },
            "xx": {
               "title": "XX Component",
               "description": "Medium describing the xx-component of the diagonal permittivity tensor.",
               "discriminator": {
                  "propertyName": "type",
                  "mapping": {
                     "Medium": "#/definitions/Medium",
                     "PoleResidue": "#/definitions/PoleResidue",
                     "Sellmeier": "#/definitions/Sellmeier",
                     "Lorentz": "#/definitions/Lorentz",
                     "Debye": "#/definitions/Debye",
                     "Drude": "#/definitions/Drude"
                  }
               },
               "oneOf": [
                  {
                     "$ref": "#/definitions/Medium"
                  },
                  {
                     "$ref": "#/definitions/PoleResidue"
                  },
                  {
                     "$ref": "#/definitions/Sellmeier"
                  },
                  {
                     "$ref": "#/definitions/Lorentz"
                  },
                  {
                     "$ref": "#/definitions/Debye"
                  },
                  {
                     "$ref": "#/definitions/Drude"
                  }
               ]
            },
            "yy": {
               "title": "YY Component",
               "description": "Medium describing the yy-component of the diagonal permittivity tensor.",
               "discriminator": {
                  "propertyName": "type",
                  "mapping": {
                     "Medium": "#/definitions/Medium",
                     "PoleResidue": "#/definitions/PoleResidue",
                     "Sellmeier": "#/definitions/Sellmeier",
                     "Lorentz": "#/definitions/Lorentz",
                     "Debye": "#/definitions/Debye",
                     "Drude": "#/definitions/Drude"
                  }
               },
               "oneOf": [
                  {
                     "$ref": "#/definitions/Medium"
                  },
                  {
                     "$ref": "#/definitions/PoleResidue"
                  },
                  {
                     "$ref": "#/definitions/Sellmeier"
                  },
                  {
                     "$ref": "#/definitions/Lorentz"
                  },
                  {
                     "$ref": "#/definitions/Debye"
                  },
                  {
                     "$ref": "#/definitions/Drude"
                  }
               ]
            },
            "zz": {
               "title": "ZZ Component",
               "description": "Medium describing the zz-component of the diagonal permittivity tensor.",
               "discriminator": {
                  "propertyName": "type",
                  "mapping": {
                     "Medium": "#/definitions/Medium",
                     "PoleResidue": "#/definitions/PoleResidue",
                     "Sellmeier": "#/definitions/Sellmeier",
                     "Lorentz": "#/definitions/Lorentz",
                     "Debye": "#/definitions/Debye",
                     "Drude": "#/definitions/Drude"
                  }
               },
               "oneOf": [
                  {
                     "$ref": "#/definitions/Medium"
                  },
                  {
                     "$ref": "#/definitions/PoleResidue"
                  },
                  {
                     "$ref": "#/definitions/Sellmeier"
                  },
                  {
                     "$ref": "#/definitions/Lorentz"
                  },
                  {
                     "$ref": "#/definitions/Debye"
                  },
                  {
                     "$ref": "#/definitions/Drude"
                  }
               ]
            }
         },
         "required": [
            "xx",
            "yy",
            "zz"
         ],
         "additionalProperties": false
      },
      "PECMedium": {
         "title": "PECMedium",
         "description": "Perfect electrical conductor class.\n\nParameters\n----------\nname : Optional[str] = None\n    Optional unique name for medium.\nfrequency_range : Optional[Tuple[float, float]] = None\n    [units = (Hz, Hz)].  Optional range of validity for the medium.\n\nNote\n----\nTo avoid confusion from duplicate PECs, should import ``tidy3d.PEC`` instance directly.",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "Optional unique name for medium.",
               "type": "string"
            },
            "frequency_range": {
               "title": "Frequency Range",
               "description": "Optional range of validity for the medium.",
               "units": [
                  "Hz",
                  "Hz"
               ],
               "type": "array",
               "minItems": 2,
               "maxItems": 2,
               "items": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "number"
                  }
               ]
            },
            "type": {
               "title": "Type",
               "default": "PECMedium",
               "enum": [
                  "PECMedium"
               ],
               "type": "string"
            }
         },
         "additionalProperties": false
      },
      "Medium2D": {
         "title": "Medium2D",
         "description": "2D diagonally anisotropic medium.\n\nParameters\n----------\nname : Optional[str] = None\n    Optional unique name for medium.\nfrequency_range : Optional[Tuple[float, float]] = None\n    [units = (Hz, Hz)].  Optional range of validity for the medium.\nss : Union[Medium, PoleResidue, Sellmeier, Lorentz, Debye, Drude]\n    Medium describing the ss-component of the diagonal permittivity tensor. The ss-component refers to the in-plane dimension of the medium that is the first component in order of 'x', 'y', 'z'. If the 2D material is normal to the y-axis, for example, then this determines the xx-component of the corresponding 3D medium.\ntt : Union[Medium, PoleResidue, Sellmeier, Lorentz, Debye, Drude]\n    Medium describing the tt-component of the diagonal permittivity tensor. The tt-component refers to the in-plane dimension of the medium that is the second component in order of 'x', 'y', 'z'. If the 2D material is normal to the y-axis, for example, then this determines the zz-component of the corresponding 3D medium.\n\nNote\n----\nOnly diagonal anisotropy is currently supported.\n\nExample\n-------\n>>> drude_medium = Drude(eps_inf=2.0, coeffs=[(1,2), (3,4)])\n>>> medium2d = Medium2D(ss=drude_medium, tt=drude_medium)",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "Optional unique name for medium.",
               "type": "string"
            },
            "frequency_range": {
               "title": "Frequency Range",
               "description": "Optional range of validity for the medium.",
               "units": [
                  "Hz",
                  "Hz"
               ],
               "type": "array",
               "minItems": 2,
               "maxItems": 2,
               "items": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "number"
                  }
               ]
            },
            "type": {
               "title": "Type",
               "default": "Medium2D",
               "enum": [
                  "Medium2D"
               ],
               "type": "string"
            },
            "ss": {
               "title": "SS Component",
               "description": "Medium describing the ss-component of the diagonal permittivity tensor. The ss-component refers to the in-plane dimension of the medium that is the first component in order of 'x', 'y', 'z'. If the 2D material is normal to the y-axis, for example, then this determines the xx-component of the corresponding 3D medium.",
               "discriminator": {
                  "propertyName": "type",
                  "mapping": {
                     "Medium": "#/definitions/Medium",
                     "PoleResidue": "#/definitions/PoleResidue",
                     "Sellmeier": "#/definitions/Sellmeier",
                     "Lorentz": "#/definitions/Lorentz",
                     "Debye": "#/definitions/Debye",
                     "Drude": "#/definitions/Drude"
                  }
               },
               "oneOf": [
                  {
                     "$ref": "#/definitions/Medium"
                  },
                  {
                     "$ref": "#/definitions/PoleResidue"
                  },
                  {
                     "$ref": "#/definitions/Sellmeier"
                  },
                  {
                     "$ref": "#/definitions/Lorentz"
                  },
                  {
                     "$ref": "#/definitions/Debye"
                  },
                  {
                     "$ref": "#/definitions/Drude"
                  }
               ]
            },
            "tt": {
               "title": "TT Component",
               "description": "Medium describing the tt-component of the diagonal permittivity tensor. The tt-component refers to the in-plane dimension of the medium that is the second component in order of 'x', 'y', 'z'. If the 2D material is normal to the y-axis, for example, then this determines the zz-component of the corresponding 3D medium.",
               "discriminator": {
                  "propertyName": "type",
                  "mapping": {
                     "Medium": "#/definitions/Medium",
                     "PoleResidue": "#/definitions/PoleResidue",
                     "Sellmeier": "#/definitions/Sellmeier",
                     "Lorentz": "#/definitions/Lorentz",
                     "Debye": "#/definitions/Debye",
                     "Drude": "#/definitions/Drude"
                  }
               },
               "oneOf": [
                  {
                     "$ref": "#/definitions/Medium"
                  },
                  {
                     "$ref": "#/definitions/PoleResidue"
                  },
                  {
                     "$ref": "#/definitions/Sellmeier"
                  },
                  {
                     "$ref": "#/definitions/Lorentz"
                  },
                  {
                     "$ref": "#/definitions/Debye"
                  },
                  {
                     "$ref": "#/definitions/Drude"
                  }
               ]
            }
         },
         "required": [
            "ss",
            "tt"
         ],
         "additionalProperties": false
      },
      "ModeSpec": {
         "title": "ModeSpec",
         "description": "Stores specifications for the mode solver to find an electromagntic mode.\nNote, the planar axes are found by popping the injection axis from {x,y,z}.\nFor example, if injection axis is y, the planar axes are ordered {x,z}.\n\nParameters\n----------\nnum_modes : PositiveInt = 1\n    Number of modes returned by mode solver.\ntarget_neff : Optional[PositiveFloat] = None\n    Guess for effective index of the mode.\nnum_pml : Tuple[NonNegativeInt, NonNegativeInt] = (0, 0)\n    Number of standard pml layers to add in the two tangential axes.\nfilter_pol : Optional[Literal['te', 'tm']] = None\n    The solver always computes the ``num_modes`` modes closest to the given ``target_neff``. If ``filter_pol==None``, they are simply sorted in order of decresing effective index. If a polarization filter is selected, the modes are rearranged such that the first ``n_pol`` modes in the list are the ones with the selected polarization fraction larger than or equal to 0.5, while the next ``num_modes - n_pol`` modes are the ones where it is smaller than 0.5 (i.e. the opposite polarization fraction is larger than 0.5). Within each polarization subset, the modes are still ordered by decreasing effective index. ``te``-fraction is defined as the integrated intensity of the E-field component parallel to the first plane axis, normalized to the total in-plane E-field intensity. Conversely, ``tm``-fraction uses the E field component parallel to the second plane axis.\nangle_theta : float = 0.0\n    [units = rad].  Polar angle of the propagation axis from the injection axis.\nangle_phi : float = 0.0\n    [units = rad].  Azimuth angle of the propagation axis in the plane orthogonal to the injection axis.\nprecision : Literal['single', 'double'] = single\n    The solver will be faster and using less memory under single precision, but more accurate under double precision.\nbend_radius : Optional[float] = None\n    [units = um].  A curvature radius for simulation of waveguide bends. Can be negative, in which case the mode plane center has a smaller value than the curvature center along the tangential axis perpendicular to the bend axis.\nbend_axis : Optional[Literal[0, 1]] = None\n    Index into the two tangential axes defining the normal to the plane in which the bend lies. This must be provided if ``bend_radius`` is not ``None``. For example, for a ring in the global xy-plane, and a mode plane in either the xz or the yz plane, the ``bend_axis`` is always 1 (the global z axis).\ntrack_freq : Optional[Literal['central', 'lowest', 'highest']] = central\n    Parameter that turns on/off mode tracking based on their similarity. Can take values ``'lowest'``, ``'central'``, or ``'highest'``, which correspond to mode tracking based on the lowest, central, or highest frequency. If ``None`` no mode tracking is performed.\ngroup_index_step : Union[bool, PositiveFloat] = False\n    Control the computation of the group index alongside the effective index. If set to a positive value, it sets the fractional frequency step used in the numerical differentiation of the effective index to compute the group index. If set to `True`, the default of 0.005 is used.\n\nExample\n-------\n>>> mode_spec = ModeSpec(num_modes=3, target_neff=1.5)",
         "type": "object",
         "properties": {
            "num_modes": {
               "title": "Number of modes",
               "description": "Number of modes returned by mode solver.",
               "default": 1,
               "exclusiveMinimum": 0,
               "type": "integer"
            },
            "target_neff": {
               "title": "Target effective index",
               "description": "Guess for effective index of the mode.",
               "exclusiveMinimum": 0,
               "type": "number"
            },
            "num_pml": {
               "title": "Number of PML layers",
               "description": "Number of standard pml layers to add in the two tangential axes.",
               "default": [
                  0,
                  0
               ],
               "type": "array",
               "minItems": 2,
               "maxItems": 2,
               "items": [
                  {
                     "type": "integer",
                     "minimum": 0
                  },
                  {
                     "type": "integer",
                     "minimum": 0
                  }
               ]
            },
            "filter_pol": {
               "title": "Polarization filtering",
               "description": "The solver always computes the ``num_modes`` modes closest to the given ``target_neff``. If ``filter_pol==None``, they are simply sorted in order of decresing effective index. If a polarization filter is selected, the modes are rearranged such that the first ``n_pol`` modes in the list are the ones with the selected polarization fraction larger than or equal to 0.5, while the next ``num_modes - n_pol`` modes are the ones where it is smaller than 0.5 (i.e. the opposite polarization fraction is larger than 0.5). Within each polarization subset, the modes are still ordered by decreasing effective index. ``te``-fraction is defined as the integrated intensity of the E-field component parallel to the first plane axis, normalized to the total in-plane E-field intensity. Conversely, ``tm``-fraction uses the E field component parallel to the second plane axis.",
               "enum": [
                  "te",
                  "tm"
               ],
               "type": "string"
            },
            "angle_theta": {
               "title": "Polar Angle",
               "description": "Polar angle of the propagation axis from the injection axis.",
               "default": 0.0,
               "units": "rad",
               "type": "number"
            },
            "angle_phi": {
               "title": "Azimuth Angle",
               "description": "Azimuth angle of the propagation axis in the plane orthogonal to the injection axis.",
               "default": 0.0,
               "units": "rad",
               "type": "number"
            },
            "precision": {
               "title": "single or double precision in mode solver",
               "description": "The solver will be faster and using less memory under single precision, but more accurate under double precision.",
               "default": "single",
               "enum": [
                  "single",
                  "double"
               ],
               "type": "string"
            },
            "bend_radius": {
               "title": "Bend radius",
               "description": "A curvature radius for simulation of waveguide bends. Can be negative, in which case the mode plane center has a smaller value than the curvature center along the tangential axis perpendicular to the bend axis.",
               "units": "um",
               "type": "number"
            },
            "bend_axis": {
               "title": "Bend axis",
               "description": "Index into the two tangential axes defining the normal to the plane in which the bend lies. This must be provided if ``bend_radius`` is not ``None``. For example, for a ring in the global xy-plane, and a mode plane in either the xz or the yz plane, the ``bend_axis`` is always 1 (the global z axis).",
               "enum": [
                  0,
                  1
               ],
               "type": "integer"
            },
            "track_freq": {
               "title": "Mode Tracking Frequency",
               "description": "Parameter that turns on/off mode tracking based on their similarity. Can take values ``'lowest'``, ``'central'``, or ``'highest'``, which correspond to mode tracking based on the lowest, central, or highest frequency. If ``None`` no mode tracking is performed.",
               "default": "central",
               "enum": [
                  "central",
                  "lowest",
                  "highest"
               ],
               "type": "string"
            },
            "group_index_step": {
               "title": "Frequency step for group index computation",
               "description": "Control the computation of the group index alongside the effective index. If set to a positive value, it sets the fractional frequency step used in the numerical differentiation of the effective index to compute the group index. If set to `True`, the default of 0.005 is used.",
               "default": false,
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "number",
                     "exclusiveMinimum": 0
                  }
               ]
            },
            "type": {
               "title": "Type",
               "default": "ModeSpec",
               "enum": [
                  "ModeSpec"
               ],
               "type": "string"
            }
         },
         "additionalProperties": false
      }
   }
}

attribute box_medium: Union[tidy3d.components.medium.Medium, tidy3d.components.medium.CustomMedium, tidy3d.components.medium.AnisotropicMedium, tidy3d.components.medium.PECMedium, tidy3d.components.medium.PoleResidue, tidy3d.components.medium.Sellmeier, tidy3d.components.medium.Lorentz, tidy3d.components.medium.Debye, tidy3d.components.medium.Drude, tidy3d.components.medium.Medium2D] = None#

Medium associated with the lower cladding layer.

Validated by
  • _ensure_consistency

  • _set_box_medium

attribute box_thickness: pydantic.types.NonNegativeFloat = None#

Domain size below the core layer.

Constraints
  • minimum = 0

Validated by
  • _ensure_consistency

  • _set_box_thickness

attribute clad_medium: Union[tidy3d.components.medium.Medium, tidy3d.components.medium.CustomMedium, tidy3d.components.medium.AnisotropicMedium, tidy3d.components.medium.PECMedium, tidy3d.components.medium.PoleResidue, tidy3d.components.medium.Sellmeier, tidy3d.components.medium.Lorentz, tidy3d.components.medium.Debye, tidy3d.components.medium.Drude, tidy3d.components.medium.Medium2D] [Required]#

Medium associated with the upper cladding layer.

Validated by
  • _ensure_consistency

attribute clad_thickness: pydantic.types.NonNegativeFloat = None#

Domain size above the core layer.

Constraints
  • minimum = 0

Validated by
  • _ensure_consistency

  • _set_clad_thickness

attribute core_medium: Union[tidy3d.components.medium.Medium, tidy3d.components.medium.CustomMedium, tidy3d.components.medium.AnisotropicMedium, tidy3d.components.medium.PECMedium, tidy3d.components.medium.PoleResidue, tidy3d.components.medium.Sellmeier, tidy3d.components.medium.Lorentz, tidy3d.components.medium.Debye, tidy3d.components.medium.Drude, tidy3d.components.medium.Medium2D] [Required]#

Medium associated with the core layer.

Validated by
  • _ensure_consistency

attribute core_thickness: pydantic.types.NonNegativeFloat [Required]#

Thickness of the core layer.

Constraints
  • minimum = 0

Validated by
  • _ensure_consistency

attribute core_width: Union[pydantic.types.NonNegativeFloat, tidy3d.components.types.ArrayLike_dtype=<class 'float'>_ndim=1] [Required]#

Core width at the top of the waveguide. If set to an array, defines the widths of adjacent waveguides.

Validated by
  • _ensure_consistency

  • _set_array

attribute gap: Union[float, tidy3d.components.types.ArrayLike_dtype=<class 'float'>_ndim=1] = 0.0#

Distance between adjacent waveguides, measured at the top core edges. An array can be used to define one gap per pair of adjacent waveguides.

Validated by
  • _ensure_consistency

  • _set_array

  • _validate_gaps

attribute grid_resolution: int = 15#

Solver grid resolution per wavelength.

Validated by
  • _ensure_consistency

attribute length: pydantic.types.NonNegativeFloat = 1e+30#

Length of the waveguides in the propagation direction

Constraints
  • minimum = 0

Validated by
  • _ensure_consistency

attribute max_grid_scaling: float = 1.2#

Maximal size increase between adjacent grid boundaries.

Validated by
  • _ensure_consistency

attribute mode_spec: tidy3d.components.mode.ModeSpec = ModeSpec(num_modes=2, target_neff=None, num_pml=(0, 0), filter_pol=None, angle_theta=0.0, angle_phi=0.0, precision='double', bend_radius=None, bend_axis=None, track_freq='central', group_index_step=False, type='ModeSpec')#

ModeSpec defining waveguide mode properties.

Validated by
  • _ensure_consistency

attribute normal_axis: Literal[0, 1, 2] = 2#

Axis normal to the substrate surface

Validated by
  • _ensure_consistency

attribute origin: Tuple[float, float, float] = (0, 0, 0)#

Center of the waveguide geometry. This coordinate represents the base of the waveguides (substrate surface) in the normal axis, and center of the geometry in the remaining axes.

Validated by
  • _ensure_consistency

attribute propagation_axis: Literal[0, 1, 2] = 0#

Axis of propagation of the waveguide

Validated by
  • _ensure_consistency

attribute side_margin: pydantic.types.NonNegativeFloat = None#

Domain size to the sides of the waveguide core.

Constraints
  • minimum = 0

Validated by
  • _ensure_consistency

  • _set_side_margin

attribute sidewall_angle: float = 0.0#

Angle of the core sidewalls measured from the vertical direction (in radians). Positive (negative) values create waveguides with bases wider (narrower) than their tops.

Validated by
  • _ensure_consistency

attribute sidewall_medium: Union[tidy3d.components.medium.Medium, tidy3d.components.medium.CustomMedium, tidy3d.components.medium.AnisotropicMedium, tidy3d.components.medium.PECMedium, tidy3d.components.medium.PoleResidue, tidy3d.components.medium.Sellmeier, tidy3d.components.medium.Lorentz, tidy3d.components.medium.Debye, tidy3d.components.medium.Drude, tidy3d.components.medium.Medium2D] = None#

Medium associated with the sidewall layer to model sidewall losses.

Validated by
  • _ensure_consistency

attribute sidewall_thickness: pydantic.types.NonNegativeFloat = 0.0#

Sidewall layer thickness (within core).

Constraints
  • minimum = 0

Validated by
  • _ensure_consistency

attribute slab_thickness: pydantic.types.NonNegativeFloat = 0.0#

Thickness of the slab for rib geometry.

Constraints
  • minimum = 0

Validated by
  • _ensure_consistency

attribute surface_medium: Union[tidy3d.components.medium.Medium, tidy3d.components.medium.CustomMedium, tidy3d.components.medium.AnisotropicMedium, tidy3d.components.medium.PECMedium, tidy3d.components.medium.PoleResidue, tidy3d.components.medium.Sellmeier, tidy3d.components.medium.Lorentz, tidy3d.components.medium.Debye, tidy3d.components.medium.Drude, tidy3d.components.medium.Medium2D] = None#

Medium associated with the surface layer to model surface losses.

Validated by
  • _ensure_consistency

attribute surface_thickness: pydantic.types.NonNegativeFloat = 0.0#

Thickness of the surface layers defined on the top of the waveguide and slab regions (if any).

Constraints
  • minimum = 0

Validated by
  • _ensure_consistency

attribute wavelength: Union[float, tidy3d.components.types.ArrayLike_dtype=<class 'float'>_ndim=1] [Required]#

Wavelength(s) at which to calculate modes (in μm).

Validated by
  • _ensure_consistency

  • _set_array

classmethod add_type_field() None#

Automatically place “type” field with model name in the model field dictionary.

classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) Model#

Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. Behaves as if Config.extra = ‘allow’ was set since it adds all passed values

copy(**kwargs) tidy3d.components.base.Tidy3dBaseModel#

Copy a Tidy3dBaseModel. With deep=True as default.

dict(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False) DictStrAny#

Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.

classmethod dict_from_file(fname: str, group_path: Optional[str] = None) dict#

Loads a dictionary containing the model from a .yaml, .json, or .hdf5 file.

Parameters
  • fname (str) – Full path to the .yaml or .json file to load the Tidy3dBaseModel from.

  • group_path (str, optional) – Path to a group inside the file to use as the base level.

Returns

A dictionary containing the model.

Return type

dict

Example

>>> simulation = Simulation.from_file(fname='folder/sim.json') 
classmethod dict_from_hdf5(fname: str, group_path: str = '') dict#

Loads a dictionary containing the model contents from a .hdf5 file.

Parameters
  • fname (str) – Full path to the .hdf5 file to load the Tidy3dBaseModel from.

  • group_path (str, optional) – Path to a group inside the file to selectively load a sub-element of the model only.

Returns

Dictionary containing the model.

Return type

dict

Example

>>> sim_dict = Simulation.dict_from_hdf5(fname='folder/sim.hdf5') 
classmethod dict_from_json(fname: str) dict#

Load dictionary of the model from a .json file.

Parameters

fname (str) – Full path to the .json file to load the Tidy3dBaseModel from.

Returns

A dictionary containing the model.

Return type

dict

Example

>>> sim_dict = Simulation.dict_from_json(fname='folder/sim.json') 
classmethod dict_from_yaml(fname: str) dict#

Load dictionary of the model from a .yaml file.

Parameters

fname (str) – Full path to the .yaml file to load the Tidy3dBaseModel from.

Returns

A dictionary containing the model.

Return type

dict

Example

>>> sim_dict = Simulation.dict_from_yaml(fname='folder/sim.yaml') 
classmethod from_file(fname: str, group_path: Optional[str] = None, **parse_obj_kwargs) tidy3d.components.base.Tidy3dBaseModel#

Loads a Tidy3dBaseModel from .yaml, .json, or .hdf5 file.

Parameters
  • fname (str) – Full path to the .yaml or .json file to load the Tidy3dBaseModel from.

  • group_path (str, optional) – Path to a group inside the file to use as the base level. Only for .hdf5 files. Starting / is optional.

  • **parse_obj_kwargs – Keyword arguments passed to either pydantic’s parse_obj function when loading model.

Returns

An instance of the component class calling load.

Return type

Tidy3dBaseModel

Example

>>> simulation = Simulation.from_file(fname='folder/sim.json') 
classmethod from_hdf5(fname: str, group_path: str = '', **parse_obj_kwargs) tidy3d.components.base.Tidy3dBaseModel#

Loads Tidy3dBaseModel instance to .hdf5 file.

Parameters
  • fname (str) – Full path to the .hdf5 file to load the Tidy3dBaseModel from.

  • group_path (str, optional) – Path to a group inside the file to selectively load a sub-element of the model only. Starting / is optional.

  • **parse_obj_kwargs – Keyword arguments passed to pydantic’s parse_obj method.

Example

>>> simulation = Simulation.from_file(fname='folder/sim.hdf5') 
classmethod from_json(fname: str, **parse_obj_kwargs) tidy3d.components.base.Tidy3dBaseModel#

Load a Tidy3dBaseModel from .json file.

Parameters

fname (str) – Full path to the .json file to load the Tidy3dBaseModel from.

Returns

  • Tidy3dBaseModel – An instance of the component class calling load.

  • **parse_obj_kwargs – Keyword arguments passed to pydantic’s parse_obj method.

Example

>>> simulation = Simulation.from_json(fname='folder/sim.json') 
classmethod from_orm(obj: Any) Model#
classmethod from_yaml(fname: str, **parse_obj_kwargs) tidy3d.components.base.Tidy3dBaseModel#

Loads Tidy3dBaseModel from .yaml file.

Parameters
  • fname (str) – Full path to the .yaml file to load the Tidy3dBaseModel from.

  • **parse_obj_kwargs – Keyword arguments passed to pydantic’s parse_obj method.

Returns

An instance of the component class calling from_yaml.

Return type

Tidy3dBaseModel

Example

>>> simulation = Simulation.from_yaml(fname='folder/sim.yaml') 
classmethod generate_docstring() str#

Generates a docstring for a Tidy3D mode and saves it to the __doc__ of the class.

classmethod get_sub_model(group_path: str, model_dict: dict | list) dict#

Get the sub model for a given group path.

static get_tuple_group_name(index: int) str#

Get the group name of a tuple element.

static get_tuple_index(key_name: str) int#

Get the index into the tuple based on its group name.

help(methods: bool = False) None#

Prints message describing the fields and methods of a Tidy3dBaseModel.

Parameters

methods (bool = False) – Whether to also print out information about object’s methods.

Example

>>> simulation.help(methods=True) 
json(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, by_alias: bool = False, skip_defaults: Optional[bool] = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, encoder: Optional[Callable[[Any], Any]] = None, models_as_dict: bool = True, **dumps_kwargs: Any) unicode#

Generate a JSON representation of the model, include and exclude arguments as per dict().

encoder is an optional function to supply as default to json.dumps(), other arguments as per json.dumps().

classmethod parse_file(path: Union[str, pathlib.Path], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: pydantic.parse.Protocol = None, allow_pickle: bool = False) Model#
classmethod parse_obj(obj: Any) Model#
classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: pydantic.parse.Protocol = None, allow_pickle: bool = False) Model#
plot(x: Optional[float] = None, y: Optional[float] = None, z: Optional[float] = None, ax: Optional[matplotlib.axes._axes.Axes] = None, source_alpha: Optional[float] = None, monitor_alpha: Optional[float] = None, **patch_kwargs) matplotlib.axes._axes.Axes#

Plot each of simulation’s components on a plane defined by one nonzero x,y,z coordinate.

Parameters
  • x (float = None) – position of plane in x direction, only one of x, y, z must be specified to define plane.

  • y (float = None) – position of plane in y direction, only one of x, y, z must be specified to define plane.

  • z (float = None) – position of plane in z direction, only one of x, y, z must be specified to define plane.

  • source_alpha (float = None) – Opacity of the sources. If None, uses Tidy3d default.

  • monitor_alpha (float = None) – Opacity of the monitors. If None, uses Tidy3d default.

  • ax (matplotlib.axes._subplots.Axes = None) – Matplotlib axes to plot on, if not specified, one is created.

Returns

The supplied or created matplotlib axes.

Return type

matplotlib.axes._subplots.Axes

plot_eps(x: Optional[float] = None, y: Optional[float] = None, z: Optional[float] = None, freq: Optional[float] = None, alpha: Optional[float] = None, source_alpha: Optional[float] = None, monitor_alpha: Optional[float] = None, ax: Optional[matplotlib.axes._axes.Axes] = None) matplotlib.axes._axes.Axes#

Plot each of simulation’s components on a plane defined by one nonzero x,y,z coordinate. The permittivity is plotted in grayscale based on its value at the specified frequency.

Parameters
  • x (float = None) – position of plane in x direction, only one of x, y, z must be specified to define plane.

  • y (float = None) – position of plane in y direction, only one of x, y, z must be specified to define plane.

  • z (float = None) – position of plane in z direction, only one of x, y, z must be specified to define plane.

  • freq (float = None) – Frequency to evaluate the relative permittivity of all mediums. If not specified, evaluates at infinite frequency.

  • alpha (float = None) – Opacity of the structures being plotted. Defaults to the structure default alpha.

  • source_alpha (float = None) – Opacity of the sources. If None, uses Tidy3d default.

  • monitor_alpha (float = None) – Opacity of the monitors. If None, uses Tidy3d default.

  • ax (matplotlib.axes._subplots.Axes = None) – Matplotlib axes to plot on, if not specified, one is created.

Returns

The supplied or created matplotlib axes.

Return type

matplotlib.axes._subplots.Axes

plot_field(field_name: str, val: Literal['real', 'imag', 'abs'] = 'real', eps_alpha: float = 0.2, robust: bool = True, vmin: Optional[float] = None, vmax: Optional[float] = None, ax: Optional[matplotlib.axes._axes.Axes] = None, **sel_kwargs) matplotlib.axes._axes.Axes#

Plot the field for a ModeSolverData with Simulation plot overlayed.

Parameters
  • field_name (str) – Name of field component to plot (eg. ‘Ex’). Also accepts ‘E’ and ‘H’ to plot the vector magnitudes of the electric and magnetic fields, and ‘S’ for the Poynting vector.

  • val (Literal['real', 'imag', 'abs', 'abs^2', 'dB'] = 'real') – Which part of the field to plot.

  • eps_alpha (float = 0.2) – Opacity of the structure permittivity. Must be between 0 and 1 (inclusive).

  • robust (bool = True) – If True and vmin or vmax are absent, uses the 2nd and 98th percentiles of the data to compute the color limits. This helps in visualizing the field patterns especially in the presence of a source.

  • vmin (float = None) – The lower bound of data range that the colormap covers. If None, they are inferred from the data and other keyword arguments.

  • vmax (float = None) – The upper bound of data range that the colormap covers. If None, they are inferred from the data and other keyword arguments.

  • ax (matplotlib.axes._subplots.Axes = None) – matplotlib axes to plot on, if not specified, one is created.

  • sel_kwargs (keyword arguments used to perform .sel() selection in the monitor data.) – These kwargs can select over the spatial dimensions (x, y, z), frequency or time dimensions (f, t) or mode_index, if applicable. For the plotting to work appropriately, the resulting data after selection must contain only two coordinates with len > 1. Furthermore, these should be spatial coordinates (x, y, or z).

Returns

The supplied or created matplotlib axes.

Return type

matplotlib.axes._subplots.Axes

plot_grid(x: Optional[float] = None, y: Optional[float] = None, z: Optional[float] = None, ax: Optional[matplotlib.axes._axes.Axes] = None, **kwargs) matplotlib.axes._axes.Axes#

Plot the cell boundaries as lines on a plane defined by one nonzero x,y,z coordinate.

Parameters
  • x (float = None) – position of plane in x direction, only one of x, y, z must be specified to define plane.

  • y (float = None) – position of plane in y direction, only one of x, y, z must be specified to define plane.

  • z (float = None) – position of plane in z direction, only one of x, y, z must be specified to define plane.

  • ax (matplotlib.axes._subplots.Axes = None) – Matplotlib axes to plot on, if not specified, one is created.

  • **kwargs – Optional keyword arguments passed to the matplotlib LineCollection. For details on accepted values, refer to Matplotlib’s documentation.

Returns

The supplied or created matplotlib axes.

Return type

matplotlib.axes._subplots.Axes

plot_structures(x: Optional[float] = None, y: Optional[float] = None, z: Optional[float] = None, ax: Optional[matplotlib.axes._axes.Axes] = None) matplotlib.axes._axes.Axes#

Plot each of simulation’s structures on a plane defined by one nonzero x,y,z coordinate.

Parameters
  • x (float = None) – position of plane in x direction, only one of x, y, z must be specified to define plane.

  • y (float = None) – position of plane in y direction, only one of x, y, z must be specified to define plane.

  • z (float = None) – position of plane in z direction, only one of x, y, z must be specified to define plane.

  • ax (matplotlib.axes._subplots.Axes = None) – Matplotlib axes to plot on, if not specified, one is created.

Returns

The supplied or created matplotlib axes.

Return type

matplotlib.axes._subplots.Axes

plot_structures_eps(x: Optional[float] = None, y: Optional[float] = None, z: Optional[float] = None, freq: Optional[float] = None, alpha: Optional[float] = None, cbar: bool = True, reverse: bool = False, ax: Optional[matplotlib.axes._axes.Axes] = None) matplotlib.axes._axes.Axes#

Plot each of simulation’s structures on a plane defined by one nonzero x,y,z coordinate. The permittivity is plotted in grayscale based on its value at the specified frequency.

Parameters
  • x (float = None) – position of plane in x direction, only one of x, y, z must be specified to define plane.

  • y (float = None) – position of plane in y direction, only one of x, y, z must be specified to define plane.

  • z (float = None) – position of plane in z direction, only one of x, y, z must be specified to define plane.

  • freq (float = None) – Frequency to evaluate the relative permittivity of all mediums. If not specified, evaluates at infinite frequency.

  • reverse (bool = False) – If False, the highest permittivity is plotted in black. If True, it is plotteed in white (suitable for black backgrounds).

  • cbar (bool = True) – Whether to plot a colorbar for the relative permittivity.

  • alpha (float = None) – Opacity of the structures being plotted. Defaults to the structure default alpha.

  • ax (matplotlib.axes._subplots.Axes = None) – Matplotlib axes to plot on, if not specified, one is created.

Returns

The supplied or created matplotlib axes.

Return type

matplotlib.axes._subplots.Axes

classmethod schema(by_alias: bool = True, ref_template: unicode = '#/definitions/{model}') DictStrAny#
classmethod schema_json(*, by_alias: bool = True, ref_template: unicode = '#/definitions/{model}', **dumps_kwargs: Any) unicode#
to_file(fname: str) None#

Exports Tidy3dBaseModel instance to .yaml, .json, or .hdf5 file

Parameters

fname (str) – Full path to the .yaml or .json file to save the Tidy3dBaseModel to.

Example

>>> simulation.to_file(fname='folder/sim.json') 
to_hdf5(fname: str) None#

Exports Tidy3dBaseModel instance to .hdf5 file.

Parameters

fname (str) – Full path to the .hdf5 file to save the Tidy3dBaseModel to.

Example

>>> simulation.to_hdf5(fname='folder/sim.hdf5') 
to_json(fname: str) None#

Exports Tidy3dBaseModel instance to .json file

Parameters

fname (str) – Full path to the .json file to save the Tidy3dBaseModel to.

Example

>>> simulation.to_json(fname='folder/sim.json') 
to_yaml(fname: str) None#

Exports Tidy3dBaseModel instance to .yaml file.

Parameters

fname (str) – Full path to the .yaml file to save the Tidy3dBaseModel to.

Example

>>> simulation.to_yaml(fname='folder/sim.yaml') 
classmethod tuple_to_dict(tuple_values: tuple) dict#

How we generate a dictionary mapping new keys to tuple values for hdf5.

classmethod update_forward_refs(**localns: Any) None#

Try to update ForwardRefs on fields based on this Model, globalns and localns.

updated_copy(**kwargs) tidy3d.components.base.Tidy3dBaseModel#

Make copy of a component instance with **kwargs indicating updated field values.

classmethod validate(value: Any) Model#
property grid_spec: tidy3d.components.grid.grid_spec.GridSpec#

Waveguide grid specification with overriding geometry.

property height: pydantic.types.NonNegativeFloat#

Domain height (size in the normal direction).

property lateral_axis: Literal[0, 1, 2]#

Lateral direction axis.

property mode_area: tidy3d.components.data.data_array.FreqModeDataArray#

Calculate the effective mode area.

property mode_solver: tidy3d.plugins.mode.mode_solver.ModeSolver#

Create a mode solver based on this waveguide structure

Return type

ModeSolver

Example

>>> wg = waveguide.RectangularDielectric(
...     wavelength=1.55,
...     core_width=0.5,
...     core_thickness=0.22,
...     core_medium=Medium(permittivity=3.48**2),
...     clad_medium=Medium(permittivity=1.45**2),
...     num_modes=2,
... )
>>> mode_data = wg.mode_solver.solve()
>>> mode_data.n_eff.values
array([[2.4536054 1.7850305]], dtype=float32)
property n_complex: tidy3d.components.data.data_array.ModeIndexDataArray#

Calculate the complex effective index.

property n_eff: tidy3d.components.data.data_array.ModeIndexDataArray#

Calculate the effective index.

property n_group: tidy3d.components.data.data_array.ModeIndexDataArray#

Calculate the group index.

property structures: List[tidy3d.components.structure.Structure]#

Waveguide structures for simulation, including the core(s), slabs (if any), and bottom cladding, if different from the top. For bend modes, the structure is a 270 degree bend regardless of length.

property width: pydantic.types.NonNegativeFloat#

Domain width (size in the lateral direction).