simulation_analysis.py¶
SimulationAnalysis
¶
Interface to make plots of multiple hdf5 files generated with Simulation.
All plot methods of the Analysis class are available in the SimulationAnalysis class.
Important
When calling an Analysis method from a SimulationAnalysis object every instance of "$id" in a str parameter will be replaced with the identifier of that hdf5, this can be useful to use with parameters like filename or title.
Example:
from comorbuss import SimulationAnalysis
analysis = SimulationAnalysis.from_folder("/data/folder")
analysis.plot_SEIR(filename="$id.pdf")
analysis.close()
empty_from_files(filenames)
classmethod
¶
Instances an empty SimulationAnalysis object from a list/array/tuples of hdf5 filenames
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filenames |
A list/numpy.array/tuple array of filenames |
required |
Returns:
Type | Description |
---|---|
SimulationAnalysis |
SimulationAnalysis object. |
Source code in comorbuss/lab/simulation_analysis.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
|
from_exp_parameters(*args, **kwargs)
classmethod
¶
Instance an SimulationAnalysis object from experiment parameters. Accepts same parameters as the Simulation class.
Returns:
Type | Description |
---|---|
SimulationAnalysis |
SimulationAnalysis object. |
Source code in comorbuss/lab/simulation_analysis.py
104 105 106 107 108 109 110 111 112 113 |
|
from_files(filenames)
classmethod
¶
Instances a SimulationAnalysis object from a list/array/tuples of hdf5 filenames
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filenames |
A list/numpy.array/tuple array of filenames |
required |
Returns:
Type | Description |
---|---|
SimulationAnalysis |
SimulationAnalysis object. |
Source code in comorbuss/lab/simulation_analysis.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
|
from_folder(folder, strings_to_ignore=[])
classmethod
¶
Instance an SimulationAnalysis object from all hdf5 files in a folder.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
folder |
str |
Path to the folder where the hdf5 files are stored. |
required |
Returns:
Type | Description |
---|---|
SimulationAnalysis |
SimulationAnalysis object. |
Source code in comorbuss/lab/simulation_analysis.py
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
|
from_sim(sim)
classmethod
¶
Instance an SimulationAnalysis object from a Simulation object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sim |
Simulation |
Simulation object to load data. |
required |
Returns:
Type | Description |
---|---|
SimulationAnalysis |
SimulationAnalysis object. |
Source code in comorbuss/lab/simulation_analysis.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
|
caller
¶
Stores a function to further calls.