From 5a1f43d6cd27c48fecded1a47d6e27eb37f84694 Mon Sep 17 00:00:00 2001 From: ftong Date: Wed, 10 Sep 2025 12:00:50 +0200 Subject: [PATCH] enforce: user must have "activity rate estimation" unselected for custom rate to be used Previously, user could enter a value enter the custom rate box, enable "activity rate estimation" and the custom rate box would disappear but the program would still see the value previously entered and use it even though it was no longer visible in the user interface --- src/seismic_hazard_forecasting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/seismic_hazard_forecasting.py b/src/seismic_hazard_forecasting.py index 3cd03c6..6d314f7 100644 --- a/src/seismic_hazard_forecasting.py +++ b/src/seismic_hazard_forecasting.py @@ -313,7 +313,7 @@ verbose: {verbose}") # run activity rate modeling lambdas = [None] - if custom_rate != None and forecast_select: + if custom_rate != None and forecast_select and not rate_select: logger.info(f"Using activity rate specified by user: {custom_rate} per {time_unit}") lambdas = np.array([custom_rate], dtype='d') lambdas_perc = np.array([1], dtype='d')