Utilities
utils.py
Module to provide utilities for the hallmd
package.
Includes
ModelRunException
- Used to note when a model has encountered an unknown error.data_write()
- Convenience function for writing .json data to file.plot_qoi()
- Convenience plotting tool for showing QoI with UQ bounds
ModelRunException
Bases: Exception
Custom exception to note when a model has encountered an unknown error while executing.
data_write(data, filename, write_dir='.')
Convenience function to write .json data files.
model_config_dir()
plot_qoi(ax, x, qoi, xlabel, ylabel, legend=False)
Plot a quantity of interest with 5%, 50%, 95% percentiles against x
.
PARAMETER | DESCRIPTION |
---|---|
ax |
matplotlib Axes object to plot on
|
x |
|
qoi |
|
xlabel |
label for the x-axis
|
ylabel |
label for the y-axis
|
legend |
whether to plot a legend
DEFAULT:
|