tidy3d.FluxData#

class tidy3d.FluxData#

Stores frequency-domain power flux data from a FluxMonitor.

Parameters
  • values (Array = None) – Values of the raw flux data in the frequency domain.

  • data_attrs (Mapping[str, str] = {'units': 'W', 'long_name': 'flux'}) – Dictionary storing extra attributes associated with the monitor data.

  • f (Array = None) – [units = Hz]. Array of frequency values to use as coordintes.

Example

>>> f = np.linspace(2e14, 3e14, 1001)
>>> values = np.random.random((len(f),))
>>> data = FluxData(values=values, f=f)

Show JSON schema
{
   "title": "FluxData",
   "description": "Stores frequency-domain power flux data from a :class:`.FluxMonitor`.\n\nParameters\n----------\nvalues : Array = None\n    Values of the raw flux data in the frequency domain.\ndata_attrs : Mapping[str, str] = {'units': 'W', 'long_name': 'flux'}\n    Dictionary storing extra attributes associated with the monitor data.\nf : Array = None\n    [units = Hz].  Array of frequency values to use as coordintes.\n\nExample\n-------\n>>> f = np.linspace(2e14, 3e14, 1001)\n>>> values = np.random.random((len(f),))\n>>> data = FluxData(values=values, f=f)",
   "type": "object",
   "properties": {
      "type": {
         "title": "Type",
         "default": "FluxData",
         "enum": [
            "FluxData"
         ],
         "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.",
         "default": {
            "units": "W",
            "long_name": "flux"
         },
         "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"
         ]
      }
   },
   "required": [
      "values",
      "f"
   ]
}

Fields
  • data_attrs (Dict[str, str])

  • values (tidy3d.components.types.Array)

attribute data_attrs: Dict[str, str] = {'long_name': 'flux', 'units': 'W'}#

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: tidy3d.components.types.Array [Required]#

Values of the raw flux data in the frequency domain.

Constraints
  • 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’]

normalize(source_freq_amps: tidy3d.components.types.Array) None#

normalize the values by the amplitude of the source.