Utilities¶
Utility functions for handling files and plotting data.
- ionworkspipeline.util.subplots_autolayout(n, *args, n_rows=None, figsize=None, layout='constrained', **kwargs)¶
Create a subplot element
- ionworkspipeline.util.export_python_script(parameter_values, filename, data_path=None)¶
Print a python script that can be used to reproduce the parameter set
Parameters¶
- parameter_valuesiwp.ParameterValues
The parameter valyes to export
- filenamestring
The name to save the parameter set under
- data_pathstring, optional
The path to the where to look for data, e.g. when loading using PyBaMM’s process_parameter_data functions. If None, then data will be looked for in the same directory as the exported file. Default is None.
- ionworkspipeline.util.exp_safe(x)¶
Safe exponential function that avoids overflow.