tidy3d.PermittivityData#

class tidy3d.PermittivityData#

Sores a collection of permittivity components over spatial coordinates and frequency from a PermittivityMonitor.

Parameters
  • data_dict (Mapping[str, ScalarPermittivityData] = None) – Mapping of the permittivity tensor names to their corresponding ScalarPermittivityData.

  • symmetry (Tuple[Literal[0, -1, 1], Literal[0, -1, 1], Literal[0, -1, 1]] = (0, 0, 0)) – igenvalues of the symmetry under reflection in x, y, and z.

  • symmetry_center (Optional[Tuple[float, float, float]] = None) – Position of the symmetry planes in x, y, and z.

  • expanded_grid (Mapping[str, Coords] = {}) – Grid after the symmetries (if any) are expanded. The dictionary keys must correspond to the data keys in the data_dict for the expanded grid to be invoked.

Example

>>> f = np.linspace(1e14, 2e14, 1001)
>>> x = np.linspace(-1, 1, 10)
>>> y = np.linspace(-2, 2, 20)
>>> z = np.linspace(0, 0, 1)
>>> values = (1+1j) * np.random.random((len(x), len(y), len(z), len(f)))
>>> eps = ScalarPermittivityData(values=values, x=x, y=y, z=z, f=f)
>>> data = PermittivityData(data_dict={'eps_xx': eps, 'eps_yy': eps, 'eps_zz': eps})

Show JSON schema
{
   "title": "PermittivityData",
   "description": "Sores a collection of permittivity components over spatial coordinates and frequency\nfrom a :class:`.PermittivityMonitor`.\n\nParameters\n----------\ndata_dict : Mapping[str, ScalarPermittivityData] = None\n    Mapping of the permittivity tensor names to their corresponding :class:`.ScalarPermittivityData`.\nsymmetry : Tuple[Literal[0, -1, 1], Literal[0, -1, 1], Literal[0, -1, 1]] = (0, 0, 0)\n    igenvalues of the symmetry under reflection in x, y, and z.\nsymmetry_center : Optional[Tuple[float, float, float]] = None\n    Position of the symmetry planes in x, y, and z.\nexpanded_grid : Mapping[str, Coords] = {}\n    Grid after the symmetries (if any) are expanded. The dictionary keys must correspond to the data keys in the ``data_dict`` for the expanded grid to be invoked.\n\nExample\n-------\n>>> f = np.linspace(1e14, 2e14, 1001)\n>>> x = np.linspace(-1, 1, 10)\n>>> y = np.linspace(-2, 2, 20)\n>>> z = np.linspace(0, 0, 1)\n>>> values = (1+1j) * np.random.random((len(x), len(y), len(z), len(f)))\n>>> eps = ScalarPermittivityData(values=values, x=x, y=y, z=z, f=f)\n>>> data = PermittivityData(data_dict={'eps_xx': eps, 'eps_yy': eps, 'eps_zz': eps})",
   "type": "object",
   "properties": {
      "type": {
         "title": "Type",
         "default": "PermittivityData",
         "enum": [
            "PermittivityData"
         ],
         "type": "string"
      },
      "data_dict": {
         "title": "Data Dictionary",
         "description": "Mapping of the permittivity tensor names to their corresponding :class:`.ScalarPermittivityData`.",
         "type": "object",
         "additionalProperties": {
            "$ref": "#/definitions/ScalarPermittivityData"
         }
      },
      "symmetry": {
         "title": "Symmetry Eigenvalues",
         "description": "igenvalues of the symmetry under reflection in x, y, and z.",
         "default": [
            0,
            0,
            0
         ],
         "type": "array",
         "minItems": 3,
         "maxItems": 3,
         "items": [
            {
               "enum": [
                  0,
                  -1,
                  1
               ],
               "type": "integer"
            },
            {
               "enum": [
                  0,
                  -1,
                  1
               ],
               "type": "integer"
            },
            {
               "enum": [
                  0,
                  -1,
                  1
               ],
               "type": "integer"
            }
         ]
      },
      "symmetry_center": {
         "title": "Symmetry Center",
         "description": "Position of the symmetry planes in x, y, and z.",
         "type": "array",
         "minItems": 3,
         "maxItems": 3,
         "items": [
            {
               "type": "number"
            },
            {
               "type": "number"
            },
            {
               "type": "number"
            }
         ]
      },
      "expanded_grid": {
         "title": "Expanded Grid",
         "description": "Grid after the symmetries (if any) are expanded. The dictionary keys must correspond to the data keys in the ``data_dict`` for the expanded grid to be invoked.",
         "default": {},
         "type": "object",
         "additionalProperties": {
            "$ref": "#/definitions/Coords"
         }
      }
   },
   "required": [
      "data_dict"
   ],
   "definitions": {
      "ScalarPermittivityData": {
         "title": "ScalarPermittivityData",
         "description": "Stores a single scalar permittivity distribution in frequency-domain.\n\nParameters\n----------\nvalues : Array = None\n    Multi-dimensional array storing the raw permittivity values in freq. domain.\ndata_attrs : Optional[Mapping[str, str]] = None\n    Dictionary storing extra attributes associated with the monitor data.\nf : Array = None\n    [units = Hz].  Array of frequency values to use as coordintes.\nx : Array = None\n    [units = um].  Array of x location values to use as coordintes.\ny : Array = None\n    [units = um].  Array of y location values to use as coordintes.\nz : Array = None\n    [units = um].  Array of z location values to use as coordintes.\n\nExample\n-------\n>>> f = np.linspace(1e14, 2e14, 1001)\n>>> x = np.linspace(-1, 1, 10)\n>>> y = np.linspace(-2, 2, 20)\n>>> z = np.linspace(0, 0, 1)\n>>> values = (1+1j) * np.random.random((len(x), len(y), len(z), len(f)))\n>>> data = ScalarPermittivityData(values=values, x=x, y=y, z=z, f=f)",
         "type": "object",
         "properties": {
            "type": {
               "title": "Type",
               "default": "ScalarPermittivityData",
               "enum": [
                  "ScalarPermittivityData"
               ],
               "type": "string"
            },
            "values": {
               "title": "NumpyArray",
               "description": "Wrapper around numpy arrays that has a well defined json schema.",
               "type": "object",
               "properties": {
                  "data_list": {
                     "title": "Data List",
                     "type": "array",
                     "items": {}
                  }
               },
               "required": [
                  "data_list"
               ]
            },
            "data_attrs": {
               "title": "Data Attributes",
               "description": "Dictionary storing extra attributes associated with the monitor data.",
               "type": "object",
               "additionalProperties": {
                  "type": "string"
               }
            },
            "f": {
               "title": "NumpyArray",
               "description": "Wrapper around numpy arrays that has a well defined json schema.",
               "units": "Hz",
               "type": "object",
               "properties": {
                  "data_list": {
                     "title": "Data List",
                     "type": "array",
                     "items": {}
                  }
               },
               "required": [
                  "data_list"
               ]
            },
            "x": {
               "title": "NumpyArray",
               "description": "Wrapper around numpy arrays that has a well defined json schema.",
               "units": "um",
               "type": "object",
               "properties": {
                  "data_list": {
                     "title": "Data List",
                     "type": "array",
                     "items": {}
                  }
               },
               "required": [
                  "data_list"
               ]
            },
            "y": {
               "title": "NumpyArray",
               "description": "Wrapper around numpy arrays that has a well defined json schema.",
               "units": "um",
               "type": "object",
               "properties": {
                  "data_list": {
                     "title": "Data List",
                     "type": "array",
                     "items": {}
                  }
               },
               "required": [
                  "data_list"
               ]
            },
            "z": {
               "title": "NumpyArray",
               "description": "Wrapper around numpy arrays that has a well defined json schema.",
               "units": "um",
               "type": "object",
               "properties": {
                  "data_list": {
                     "title": "Data List",
                     "type": "array",
                     "items": {}
                  }
               },
               "required": [
                  "data_list"
               ]
            }
         },
         "required": [
            "values",
            "f",
            "x",
            "y",
            "z"
         ]
      },
      "Coords": {
         "title": "Coords",
         "description": "Holds data about a set of x,y,z positions on a grid.\n\nParameters\n----------\nx : Array = None\n    1-dimensional array of x coordinates.\ny : Array = None\n    1-dimensional array of y coordinates.\nz : Array = None\n    1-dimensional array of z coordinates.\n\nExample\n-------\n>>> x = np.linspace(-1, 1, 10)\n>>> y = np.linspace(-1, 1, 11)\n>>> z = np.linspace(-1, 1, 12)\n>>> coords = Coords(x=x, y=y, z=z)",
         "type": "object",
         "properties": {
            "x": {
               "title": "NumpyArray",
               "description": "Wrapper around numpy arrays that has a well defined json schema.",
               "type": "object",
               "properties": {
                  "data_list": {
                     "title": "Data List",
                     "type": "array",
                     "items": {}
                  }
               },
               "required": [
                  "data_list"
               ]
            },
            "y": {
               "title": "NumpyArray",
               "description": "Wrapper around numpy arrays that has a well defined json schema.",
               "type": "object",
               "properties": {
                  "data_list": {
                     "title": "Data List",
                     "type": "array",
                     "items": {}
                  }
               },
               "required": [
                  "data_list"
               ]
            },
            "z": {
               "title": "NumpyArray",
               "description": "Wrapper around numpy arrays that has a well defined json schema.",
               "type": "object",
               "properties": {
                  "data_list": {
                     "title": "Data List",
                     "type": "array",
                     "items": {}
                  }
               },
               "required": [
                  "data_list"
               ]
            },
            "type": {
               "title": "Type",
               "default": "Coords",
               "enum": [
                  "Coords"
               ],
               "type": "string"
            }
         },
         "required": [
            "x",
            "y",
            "z"
         ],
         "additionalProperties": false
      }
   }
}

Fields
  • data_dict (Dict[str, tidy3d.components.data.ScalarPermittivityData])

attribute data_dict: Dict[str, tidy3d.components.data.ScalarPermittivityData] [Required]#

Get the permittivity components from the dict using convenient “dot” syntax.

Mapping of the permittivity tensor names to their corresponding ScalarPermittivityData.

set_symmetry_attrs(simulation: tidy3d.components.simulation.Simulation, monitor_name: str)#

Set the collection data attributes related to symmetries.

property eps_xx#

Get eps_xx component.

property eps_yy#

Get eps_yy component.

property eps_zz#

Get eps_zz component.