@@ -52,9 +52,6 @@ def __init__(self, p: Parameters):
52
52
53
53
susceptible = p .population - infected
54
54
55
- intrinsic_growth_rate = get_growth_rate (p .doubling_time )
56
- self .intrinsic_growth_rate = intrinsic_growth_rate
57
-
58
55
gamma = 1.0 / p .infectious_days
59
56
self .gamma = gamma
60
57
@@ -66,6 +63,8 @@ def __init__(self, p: Parameters):
66
63
# Back-projecting to when the first hospitalized case would have
67
64
logger .info ('Using doubling_time: %s' , p .doubling_time )
68
65
66
+ intrinsic_growth_rate = get_growth_rate (p .doubling_time )
67
+
69
68
self .beta = get_beta (intrinsic_growth_rate , gamma , self .susceptible , 0.0 )
70
69
71
70
self .i_day = 0 # seed to the full length
@@ -112,7 +111,6 @@ def __init__(self, p: Parameters):
112
111
self .beta_t = get_beta (intrinsic_growth_rate , self .gamma , self .susceptible , p .relative_contact_rate )
113
112
self .run_projection (p )
114
113
115
- self .intrinsic_growth_rate = intrinsic_growth_rate
116
114
self .population = p .population
117
115
else :
118
116
logger .info (
@@ -129,6 +127,8 @@ def __init__(self, p: Parameters):
129
127
self .susceptible = self .raw_df ['susceptible' ].values [self .i_day ]
130
128
self .recovered = self .raw_df ['recovered' ].values [self .i_day ]
131
129
130
+ self .intrinsic_growth_rate = intrinsic_growth_rate
131
+
132
132
# r_t is r_0 after distancing
133
133
self .r_t = self .beta_t / gamma * susceptible
134
134
self .r_naught = self .beta / gamma * susceptible
0 commit comments