-
Notifications
You must be signed in to change notification settings - Fork 1
Plotting Capabilities
The Scenarios Mechanistic Model has the ability to plot basic summary figures after it has been run to produce a timeline of all compartments. The only source of user influenced behavior comes from the plot commands passed to the plotting functions. Plotting and interpretation of model outputs is the responsibility of the SolutionInterpreter
class, which takes as input the Solution
object from the MechanisticRunner
, and a path to some local and global configuration scripts.
as a basic command, the summarize_solution()
method can quickly display results of a run. Taking only 3 arguments, the plot commands, legend labels, and an optional save path.
Plot commands have the following options:
-
A compartment title: e.g. S, E, I, C
Will plot the population of the specified compartment, summed across all dimensions.
-
A strain title: as specified by user defined strain names
Will plot the population of the exposed and infectious compartments infected with the specified strain.
-
Waning Index: e.g. W1
Will plot the population of a specific waning index in the susceptible compartment, summed across all other dimensions.
-
Incidence: e.g. “incidence”
Plots a scatter of the Incidence of infections by scanning entries into the E compartment.
-
Strain Prevalence: e.g. “strain prevalence”
Plots a stacked line plot of the relative prevalence of each strain in terms of the populations of the Exposed and Infectious compartments. Values will range between 0 and 1.
-
Explicit ModeL e.g. “S[0, 0, 0, :]”
An explicit plotting mode that allows for users to specify numpy slices of the compartments they wish to plot.
In this example “S[0, 0, 0, :]” the user indicates they wish to see the population of the Susceptible compartment, but specifically the 0-index age bin, no previous infections, 0 vaccinations, and any waning compartment population. As in numpy matrices, pythonic slicing is accepted, however operations such as addition and subtraction are not.