tidy3d.components.data.AbstractFieldData#

class tidy3d.components.data.AbstractFieldData#

Sores a collection of EM fields either in freq or time domain.

Parameters
  • data_dict (Mapping[str, MonitorData] = None) – Mapping of name to each MonitorData in the collection.

  • 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.

Show JSON schema
{
   "title": "AbstractFieldData",
   "description": "Sores a collection of EM fields either in freq or time domain.\n\nParameters\n----------\ndata_dict : Mapping[str, MonitorData] = None\n    Mapping of name to each :class:`.MonitorData` in the collection.\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.",
   "type": "object",
   "properties": {
      "type": {
         "title": "Type",
         "default": "AbstractFieldData",
         "enum": [
            "AbstractFieldData"
         ],
         "type": "string"
      },
      "data_dict": {
         "title": "Data Dictionary",
         "description": "Mapping of name to each :class:`.MonitorData` in the collection.",
         "type": "object",
         "additionalProperties": {
            "$ref": "#/definitions/MonitorData"
         }
      },
      "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": {
      "MonitorData": {
         "title": "MonitorData",
         "description": "Abstract base class for objects storing individual data from simulation.\n\nParameters\n----------\nvalues : Union[Array, Array] = None\n    Values of the raw data being stored.\ndata_attrs : Optional[Mapping[str, str]] = None\n    Dictionary storing extra attributes associated with the monitor data.",
         "type": "object",
         "properties": {
            "type": {
               "title": "Type",
               "default": "MonitorData",
               "enum": [
                  "MonitorData"
               ],
               "type": "string"
            },
            "values": {
               "title": "Values",
               "description": "Values of the raw data being stored.",
               "anyOf": [
                  {
                     "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"
                     ]
                  },
                  {
                     "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"
               }
            }
         },
         "required": [
            "values"
         ]
      },
      "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

property Ex#

Get Ex component of field using ‘.Ex’ syntax.

property Ey#

Get Ey component of field using ‘.Ey’ syntax.

property Ez#

Get Ez component of field using ‘.Ez’ syntax.

property Hx#

Get Hx component of field using ‘.Hx’ syntax.

property Hy#

Get Hy component of field using ‘.Hy’ syntax.

property Hz#

Get Hz component of field using ‘.Hz’ syntax.