visualexpplotter.py¶
This module contains functions for plotting virtuals sensor trace summary statistics and uncertainty bounds over simulated experiments.
- plot_exp_traces(exp_data, comp_ind, sens_key, sim_key, descriptor, trace_opts=None, plot_opts=None, exp_save_keys=None)[source]¶
Plots the traces from a set of simulated experiments for a given input physics simulation and sensor array.
- Parameters:
exp_data (
dict[tuple[str,...],np.ndarray]) – Simulated experiment data dictionary produced by the experiment simulator.comp_ind (
int) – Index for the component of the measurement array to plot. For scalar field sensors there is only one component so this should be 0. For vector field sensors the components are in the order the keys where specified which is normally x,y,z. For tensor field sensors the keys are in the order they are specified with normal followed by deviatoric components.sens_key (
str) – String key identifying the sensor array in the simulated experiment data dictionary.sim_key (
str) – String key identifying the input physics simulation in the simulation data dictionary.descriptor (
SensorDescriptor) – Descriptor containing strings for labelling the plot axes with sensor units and names.trace_opts (
TraceOptsExperiment | None, optional) – Options for plotting the experiment traces including how to display the scatter in the traces, by default None. If None a default options dataclass is created.plot_opts (
PlotOptsGeneral | None, optional) – Options for controlling characteristics of the plot including the size of the figure, line widths etc., by default None. If None a default plot options dataclass is created.exp_save_keys (
ExpSimSaveKeys | None, optional) – Keys for extracting the simulation data from the simulated experiment data dictionary, by default None. If None the default keys are used.
- Returns:
tuple[mpf.Figure,mpa.Axes]– Figure and axes object for the matplotlib plot that is created.