tidy3d.FluxData#
- class FluxData[source]#
- Bases: - MonitorData- Data associated with a - FluxMonitor: flux data in the frequency-domain.- Parameters:
- attrs (dict = {}) – 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, - attrsare mutable. For example, the following is allowed for setting an- attr- obj.attrs['foo'] = bar. Also note that Tidy3D` will raise a- TypeErrorif- attrscontain objects that can not be serialized. One can check if- attrsare serializable by calling- obj.json().
- monitor (FluxMonitor) – Frequency-domain flux monitor associated with the data. 
- flux (FluxDataArray) – Flux values in the frequency-domain. 
 
 - Notes - The data is stored as a DataArray object using the xarray package. - We can access the data for each monitor by indexing into the - SimulationDatawith the monitor- .name. For the flux monitor data, we can access the raw flux data as a function of frequency with- .flux. As most data are multidimensional, it’s often very helpful to print out the data and directly inspect its structure.- Example - >>> from tidy3d import FluxDataArray >>> f = [2e14, 3e14] >>> coords = dict(f=f) >>> flux_data = FluxDataArray(np.random.random(2), coords=coords) >>> monitor = FluxMonitor(size=(2,0,6), freqs=[2e14, 3e14], name='flux') >>> data = FluxData(monitor=monitor, flux=flux_data) - See also - Attributes - Methods - make_adjoint_sources(dataset_names, fwidth)- Converts a - FieldDatato a list of adjoint current or point sources.- normalize(source_spectrum_fn)- Return copy of self after normalization is applied using source spectrum function. - Inherited Common Usage - monitor#
 - flux#
 - make_adjoint_sources(dataset_names, fwidth)[source]#
- Converts a - FieldDatato a list of adjoint current or point sources.
 - normalize(source_spectrum_fn)[source]#
- Return copy of self after normalization is applied using source spectrum function. 
 - __hash__()#
- Hash method.