Results

Results#

A model’s results are in its DataBase, from Model.get_db(). The functions below collect several results at once and save them to files.

DataBase

The results of a model run.

Saving results#

extract_database_results

Collect several results from a database into one dictionary.

write_db_results_multiple_csv

Write each result to its own CSV file.

write_db_results_json

Write all the results to one JSON file.

write_db_results_multiple_json

Write each result to its own JSON file.

write_db_results_hdf5

Write the results to an HDF5 file, one group per result.

write_db_results_zarr

Write the results to a Zarr store, one group per result.

JSON helpers#

NumpyJSONEncoder

JSON encoder that stores NumPy scalars and arrays with their types.

numpy_json_decoder

Restore the NumPy values written by NumpyJSONEncoder.