pytrnsys_process.api.load_simulation_from_pickle#
- pytrnsys_process.api.load_simulation_from_pickle(path: ~pathlib.Path, logger: ~logging.Logger = <Logger default_pytrnsys_process (WARNING)>) Simulation[source]#
Load a Simulation object from a pickle file.
This function loads a previously saved Simulation object from a pickle file.
- Parameters:
path (pathlib.Path) – To the pickle file to load
logger (logging.Logger, optional) – Logger object that will log any messages, warnings, and/or errors
- Returns:
Simulation – Reconstructed Simulation object
- Return type:
pytrnsys_processing.data_structures.Simulation- Raises:
OSError – If there’s an error reading the file:
pickle.UnpicklingError – If the file is corrupted or invalid: