vivarium.library.timeseries module¶
-
vivarium.library.timeseries.
process_path_timeseries_for_csv
(path_ts)[source]¶ Prepare path timeseries data for writing to CSV
Processing Steps:
Convert any dictionary keys that are tuples to strings by joining the tuple elements with
-
.Remove from the timeseries any data where each timepoint is not numeric. For example, we remove data where each timepoint is a matrix or a string.
Note
We assume that across timepoints for the same variable, the data types are the same.
- Returns
A timeseries that can be saved to a CSV with
save_flat_timeseries()
.- Return type
-
vivarium.library.timeseries.
save_flat_timeseries
(timeseries, out_dir, filename)[source]¶ Save a flattened timeseries to a CSV file
The CSV file will have one column for each key in the timeseries. The heading will be the key, and the rows will contain the timeseries data, one row per timepoint, in increasing order of time.