@@ -52,9 +52,6 @@ def __init__(self, p: Parameters):
5252
5353 susceptible = p .population - infected
5454
55- intrinsic_growth_rate = get_growth_rate (p .doubling_time )
56- self .intrinsic_growth_rate = intrinsic_growth_rate
57-
5855 gamma = 1.0 / p .infectious_days
5956 self .gamma = gamma
6057
@@ -66,6 +63,8 @@ def __init__(self, p: Parameters):
6663 # Back-projecting to when the first hospitalized case would have
6764 logger .info ('Using doubling_time: %s' , p .doubling_time )
6865
66+ intrinsic_growth_rate = get_growth_rate (p .doubling_time )
67+
6968 self .beta = get_beta (intrinsic_growth_rate , gamma , self .susceptible , 0.0 )
7069
7170 self .i_day = 0 # seed to the full length
@@ -112,7 +111,6 @@ def __init__(self, p: Parameters):
112111 self .beta_t = get_beta (intrinsic_growth_rate , self .gamma , self .susceptible , p .relative_contact_rate )
113112 self .run_projection (p )
114113
115- self .intrinsic_growth_rate = intrinsic_growth_rate
116114 self .population = p .population
117115 else :
118116 logger .info (
@@ -129,6 +127,8 @@ def __init__(self, p: Parameters):
129127 self .susceptible = self .raw_df ['susceptible' ].values [self .i_day ]
130128 self .recovered = self .raw_df ['recovered' ].values [self .i_day ]
131129
130+ self .intrinsic_growth_rate = intrinsic_growth_rate
131+
132132 # r_t is r_0 after distancing
133133 self .r_t = self .beta_t / gamma * susceptible
134134 self .r_naught = self .beta / gamma * susceptible
0 commit comments