{
  "title": "FluxData",
  "public_path": "flex_rf.tidy3d.FluxData",
  "lookup_path": "tidy3d.FluxData",
  "slug": "flex_rf/tidy3d/FluxData",
  "public_url": "/rf/latest/autogenerated/flex_rf/tidy3d/fluxdata/",
  "object_kind": "class",
  "introduction": "Data associated with a `FluxMonitor`: flux data in the frequency-domain.",
  "notes": "The data is stored as a [DataArray](https://docs.xarray.dev/en/stable/generated/xarray.DataArray.html)\nobject using the [xarray](https://docs.xarray.dev/en/stable/index.html) package.\n\nWe can access the data for each monitor by indexing into the `SimulationData` with the monitor\n`.name`. For the flux monitor data, we can access the raw flux data as a function of frequency with\n`.flux`. As most data are multidimensional, it’s often very helpful to print out the data and directly\ninspect its structure.",
  "examples": "```python\nfrom tidy3d import FluxDataArray\nf = [2e14, 3e14]\ncoords = dict(f=f)\nflux_data = FluxDataArray(np.random.random(2), coords=coords)\nmonitor = FluxMonitor(size=(2,0,6), freqs=[2e14, 3e14], name='flux')\ndata = FluxData(monitor=monitor, flux=flux_data)\n```",
  "references": "",
  "signature": "class FluxData(MonitorData)",
  "source": {
    "path": "flex/public/tidy3d/tidy3d/components/data/monitor_data.py",
    "url": "",
    "lineno": 3707,
    "endlineno": 3771
  },
  "bases": [
    "MonitorData"
  ],
  "parameter_rows": [
    {
      "name": "monitor",
      "annotation": "FluxMonitor",
      "default": "",
      "description": "Frequency-domain flux monitor associated with the data.",
      "origin": "declared"
    },
    {
      "name": "flux",
      "annotation": "FluxDataArray",
      "default": "",
      "description": "Flux values in the frequency-domain.",
      "origin": "declared"
    },
    {
      "name": "attrs",
      "annotation": "dict",
      "default": "factory: dict",
      "description": "Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields, `attrs` are mutable. For example, the following is allowed for setting an `attr` `obj.attrs['foo'] = bar`. Also note that Tidy3D will raise a `TypeError` if `attrs` contain objects that can not be serialized. One can check if `attrs` are serializable by calling `obj.model_dump_json()`.",
      "origin": "inherited"
    }
  ],
  "members": [
    {
      "name": "normalize",
      "kind": "function",
      "signature": "normalize(source_spectrum_fn: Callable[[DataArray], NDArray])",
      "description": "Return copy of self after normalization is applied using source spectrum function."
    }
  ],
  "group": "flex_rf.tidy3d"
}
