misc#
Miscellaneous functions that do not belong anywhere else
Functions
Convert any reasonable object -- a string, integer, or datetime object, or list/array of any of those -- to a date object (or string, pandas, or numpy date). |
|
Convert a string, date/datetime object, or int to a day (int), the number of days since the start day. |
|
Convenience function to find the difference between two or more days. |
|
Return a list of dates from the start date to the end date. |
|
Load data for comparing to the model output, either from file or from a dataframe. |
|
Convenience method for sc.loadobj() and equivalent to cv.Sim.load() or cv.Scenarios.load(). |
|
Convenience method for sc.saveobj() and equivalent to cv.Sim.save() or cv.Scenarios.save(). |
|
Wrapper for Matplotlib's |
|
Define migrations allowing compatibility between different versions of saved files. |
|
Get current git information and optionally write it to disk. |
|
Get current git information and optionally write it to disk. |
|
A convenience function that bundles check_version with git_info and saves automatically to disk from the calling file. |
|
Function for loading parameters from the specified version. |
|
Read metadata from a PNG file. |
|
Alternate method to calculate doubling time (one is already implemented in the sim object). |
|
Calculate the goodness of fit. |
|
Get help on Covasim in general, or search for a word/expression. |