sncosmo.flatten_result¶
- sncosmo.flatten_result(res)[source]¶
Turn a result from fit_lc into a simple dictionary of key, value pairs.
Useful when saving results to a text file table, where structures like a covariance matrix cannot be easily written to a single table row.
- Parameters:
- resResult
Result object from
fit_lc
.
- Returns:
- flatresResult
Flattened result. Keys are all strings, values are one of: float, int, string), suitable for saving to a text file.