tidy3d.components.base_sim.data.sim_data.AbstractSimulationData#
- class AbstractSimulationData[source]#
Bases:
Tidy3dBaseModel,ABCStores data from a collection of
AbstractMonitorobjects in aAbstractSimulation.- Parameters:
simulation (
AbstractSimulation) – OriginalAbstractSimulationassociated with the data.data (tuple[
AbstractMonitorData, …]) – List ofAbstractMonitorDatainstances associated with the monitors of the originalAbstractSimulation.log (Optional[str] = None) – A string containing the log information from the simulation run.
Attributes
Dictionary mapping monitor name to its associated
AbstractMonitorData.Methods
Ensure each
AbstractMonitorDatain.datacorresponds to a monitor in.simulation.get_monitor_by_name(name)Return monitor named 'name'.
to_mat_file(fname, **kwargs)Output the simulation data object as
.matMATLAB file.Ensure all
AbstractMonitorDataentries in.datacorrespond to different monitors in.simulation.- simulation#
- data#
- log#
- property monitor_data#
Dictionary mapping monitor name to its associated
AbstractMonitorData.
- data_monitors_match_sim()[source]#
Ensure each
AbstractMonitorDatain.datacorresponds to a monitor in.simulation.
- classmethod validate_no_ambiguity(val)[source]#
Ensure all
AbstractMonitorDataentries in.datacorrespond to different monitors in.simulation.
- to_mat_file(fname, **kwargs)[source]#
Output the simulation data object as
.matMATLAB file.- Parameters:
fname (PathLike) – Full path to the output file. Should include
.matfile extension.**kwargs (dict, optional) – Extra arguments to
scipy.io.savemat: seescipydocumentation for more detail.
Example
>>> sim_data.to_mat_file('/path/to/file/data.mat')