From 664ab1025b5095ce3ddccc0d614129301d7bd88a Mon Sep 17 00:00:00 2001 From: ftong Date: Mon, 7 Jul 2025 16:42:57 +0200 Subject: [PATCH] catch time_win_duration values that are too large --- src/seismic_hazard_forecasting.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/seismic_hazard_forecasting.py b/src/seismic_hazard_forecasting.py index e41d787..2213c35 100644 --- a/src/seismic_hazard_forecasting.py +++ b/src/seismic_hazard_forecasting.py @@ -339,8 +339,8 @@ verbose: {verbose}") elif time_unit == 'years': multiplicator = 1 / 365 - # Raise an exception when time_range from the user is too large - if time_range/multiplicator > 0.5*(time[-1] - time[0]): + # Raise an exception when time_win_duration from the user is too large relative to the catalog + if time_win_duration/multiplicator > 0.5*(time[-1] - time[0]): msg = "Activity rate estimation time window must be less than half the catalog length. Use a shorter time window." logger.error(msg) raise Exception(msg)