tidy3d.components.data.MonitorData#

class tidy3d.components.data.MonitorData#

Abstract base class for objects storing individual data from simulation.

Parameters
  • values (Union[Array, Array]) – Values of the raw data being stored.

  • data_attrs (Optional[Mapping[str, str]] = None) – Dictionary storing extra attributes associated with the monitor data.

Show JSON schema
{
   "title": "MonitorData",
   "description": "Abstract base class for objects storing individual data from simulation.\n\nParameters\n----------\nvalues : Union[Array, Array]\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"
   ]
}

Fields
attribute data_attrs: Dict[str, str] = None#

explanation of values values is a numpy array that stores the raw data associated with each MonitorData. It can be complex-valued or real valued, depending on whether data is in the frequency or time domain, respectively. Each axis in values corresponds to a specific dimension in the MonitorData, which are supplied as arguments to the MonitorData subclasses. The order of the dimensions is specified in the _dims attribute of each MonitorData subclass

Dictionary storing extra attributes associated with the monitor data.

attribute values: Union[tidy3d.components.types.Array, tidy3d.components.types.Array] [Required]#

Values of the raw data being stored.

add_to_group(hdf5_grp) None#

Add data contents to an hdf5 group.

classmethod load_from_group(hdf5_grp)#

Load Monitor data instance from an hdf5 group.

property data: tidy3d.components.data.Tidy3dDataArray#

Returns an xarray representation of the montitor data.

Returns

Representation of the monitor data using xarray. For more details refer to xarray’s Documentaton.

Return type

xarray.DataArray

property sim_data_getitem: tidy3d.components.data.Tidy3dDataArray#

What gets returned by sim_data[‘monitor_data_name’]