geossm.utils.write¶
- geossm.utils.write(filename, grid_obs, ssm_model, mode='a')[source]¶
Append a run log (observation grid, model, and hardware info) to a text file.
Formats a timestamped, human-readable report – the string representation (
__str__) of each object in grid_obs, of ssm_model, and ofgetHardware()’s output – and writes it to filename. Intended as a lightweight run log for long-running fits, not a machine-readable serialization format.- Parameters:
filename (
stroros.PathLike) – Path of the file to write (or append) the report to.grid_obs (
sequence) – Observation-grid object(s) to include in the report; each is rendered via its own__str__.ssm_model (
object) – The (state-space) model to include in the report, rendered via its__str__.mode (
str, default"a") – File open mode passed to open (e.g."a"to append,"w"to overwrite).
- Returns:
filename (
stroros.PathLike) – The filename argument, unchanged.mode (
str) – The mode argument, unchanged.