diff --git a/pyaerocom/aeroval/setupclasses.py b/pyaerocom/aeroval/setupclasses.py index 207f7ef91..c4020af4e 100644 --- a/pyaerocom/aeroval/setupclasses.py +++ b/pyaerocom/aeroval/setupclasses.py @@ -190,8 +190,8 @@ class StatisticsSetup(BaseModel, extra="allow"): avg_over_trends: bool = ( False # Adds calculation of avg over trends of time series of stations in region ) - obs_min_yrs: PositiveInt = 0 # Removes stations with less than this number of years of valid data (a year with data points in all four seasons) Should in most cases be the same as min_yrs - stats_min_yrs: PositiveInt = obs_min_yrs # Calculates trends if number of valid years are equal or more than this. Should in most cases be the same as min_yrs + obs_min_yrs: PositiveInt = 0 # Removes stations with less than this number of years of valid data (a year with data points in all four seasons) Should in most cases be the same as stats_min_yrs + stats_min_yrs: PositiveInt = obs_min_yrs # Calculates trends if number of valid years are equal or more than this. Should in most cases be the same as obs_min_yrs sequential_yrs: bool = False # Whether or not the min_yrs should be sequential stats_tseries_base_freq: str | None = None diff --git a/tests/aeroval/test_setupclasses.py b/tests/aeroval/test_setupclasses.py index 4fd79ab2d..56f01b2b7 100644 --- a/tests/aeroval/test_setupclasses.py +++ b/tests/aeroval/test_setupclasses.py @@ -190,7 +190,7 @@ def test_EvalSetup_EvalRunOptions(eval_setup: EvalSetup, cfg_exp1: dict, update: pytest.param(None, id="default"), pytest.param( dict( - trends_min_yrs=10, + stats_min_yrs=10, use_diurnal=True, use_fairmode=True, weighted_stats=False, @@ -207,9 +207,9 @@ def test_EvalSetup_StatisticsSetup(eval_setup: EvalSetup, cfg_exp1: dict, update statistics_opts = eval_setup.statistics_opts if update: assert ( - statistics_opts.trends_min_yrs - == cfg_exp1["trends_min_yrs"] - == update["trends_min_yrs"] + statistics_opts.stats_min_yrs + == cfg_exp1["stats_min_yrs"] + == update["stats_min_yrs"] ) assert statistics_opts.use_diurnal == cfg_exp1["use_diurnal"] == update["use_diurnal"] assert statistics_opts.use_fairmode == cfg_exp1["use_fairmode"] == update["use_fairmode"] @@ -235,8 +235,8 @@ def test_EvalSetup_StatisticsSetup(eval_setup: EvalSetup, cfg_exp1: dict, update == update["annual_stats_constrained"] ) else: # defaults - assert "trends_min_yrs" not in cfg_exp1 - assert statistics_opts.trends_min_yrs == 0 + assert "stats_min_yrs" not in cfg_exp1 + assert statistics_opts.stats_min_yrs == 0 assert "use_diurnal" not in cfg_exp1 assert statistics_opts.use_diurnal is False assert "use_fairmode" not in cfg_exp1