def test_smoothing_and_causality(tmp_path): run_individual( "56", # Wyoming load_data.DataSpec( generator_type=load_data.DataGeneratorType.EXP, disable_deaths=True, scale=1000.0, ratechange1=RateChange(0, 1.0), ratechange2=RateChange(95, 5.0), ), "test_smoothing_and_causality", output_dir=tmp_path, )
def test_low_scale_two_decays(tmp_path): """Track low scale decay at two different rates""" (rt1, rt2, t_switch, rt) = run_individual( "06", # California load_data.DataSpec( generator_type=load_data.DataGeneratorType.EXP, disable_deaths=True, scale=50.0, ratechange1=RateChange(0, 0.9), ratechange2=RateChange(50, 0.7), ), "test_low_scale_two_decays", output_dir=tmp_path, ) check_standard_assertions(rt1, rt2, t_switch, rt)
def test_high_scale_late_growth(tmp_path): """Track decaying from high initial count to low number then strong growth""" (rt1, rt2, t_switch, rt) = run_individual( "02", # Alaska load_data.DataSpec( generator_type=load_data.DataGeneratorType.EXP, disable_deaths=True, scale=2000.0, ratechange1=RateChange(0, 0.95), ratechange2=RateChange(70, 1.5), ), "test_high_scale_late_growth", output_dir=tmp_path, ) check_standard_assertions(rt1, rt2, t_switch, rt)
def test_low_cases_weak_growth(tmp_path): """Track with low scale (count = 5) and slow growth""" (rt1, rt2, t_switch, rt) = run_individual( "50", # Vermont load_data.DataSpec( generator_type=load_data.DataGeneratorType.EXP, disable_deaths=True, scale=5.0, ratechange1=RateChange(0, 1.0), ratechange2=RateChange(70, 1.2), ), "test_low_cases_weak_growth", output_dir=tmp_path, ) check_standard_assertions(rt1, rt2, t_switch, rt)
def test_med_scale_strong_growth_and_decay(tmp_path): """Track cases growing strongly and then decaying strongly""" (rt1, rt2, t_switch, rt) = run_individual( "36", # New York load_data.DataSpec( generator_type=load_data.DataGeneratorType.EXP, disable_deaths=True, scale=100.0, ratechange1=RateChange(0, 1.5), ratechange2=RateChange(50, 0.7), ), "test_med_scale_strong_growth_and_decay", output_dir=tmp_path, ) check_standard_assertions(rt1, rt2, t_switch, rt)
def test_constant_cases_high_count(tmp_path): """Track constant cases (R=1) at low count""" data_spec = load_data.DataSpec( generator_type=load_data.DataGeneratorType.EXP, disable_deaths=True, scale=1000.0, ratechange1=RateChange(0, 1.0), ratechange2=RateChange(80, 1.5), # To avoid plotting issues ) rt1, rt2, t_switch, rt = run_individual( "20", data_spec, "test_constant_cases_high_count", output_dir=tmp_path # Kansas ) check_standard_assertions(rt1, rt2, t_switch, rt)