Commit 0f5d63b 1 parent 5166fdb commit 0f5d63b Copy full SHA for 0f5d63b
File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -614,10 +614,10 @@ def update_params_for_interventions(self):
614
614
def contraception_initiation_with_interv (p_start_per_month_without_interv ):
615
615
"""Increase the probabilities of a woman starting modern contraceptives due to Pop intervention being
616
616
applied."""
617
- # TODO: remove the keys before intervention year
618
617
p_start_per_month_with_interv = {}
619
618
for year , age_method_df in p_start_per_month_without_interv .items ():
620
- p_start_per_month_with_interv [year ] = age_method_df * self .parameters ['Interventions_Pop' ].loc [0 ]
619
+ if year >= self .sim .date .year :
620
+ p_start_per_month_with_interv [year ] = age_method_df * self .parameters ['Interventions_Pop' ].loc [0 ]
621
621
return p_start_per_month_with_interv
622
622
623
623
def contraception_initiation_after_birth_with_interv (p_start_after_birth_without_interv ):
You can’t perform that action at this time.
0 commit comments