From 6c47b7548d777d837fdec1afb924e1c47eda47ee Mon Sep 17 00:00:00 2001 From: ftong Date: Fri, 22 Aug 2025 12:17:56 +0200 Subject: [PATCH] Update src/seismic_hazard_forecasting.py --- 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 3cab54d..1685ffd 100644 --- a/src/seismic_hazard_forecasting.py +++ b/src/seismic_hazard_forecasting.py @@ -153,13 +153,13 @@ def compute_IMT_exceedance(rx_lat, rx_lon, r, fr, p, lambdas, D, percentages_D, lower_bound_value = exceedance_root_function(IMT_min) mid_point_value = exceedance_root_function(IMT_mid) upper_bound_value = exceedance_root_function(IMT_max) - + return None logger.info(f"Receiver: {str(rx_label)}") logger.info(f"Function value at {imt} = {str(IMT_min)} : {lower_bound_value}") logger.info(f"Function value at {imt} = {str(IMT_mid)} : {mid_point_value}") logger.info(f"Function value at {imt} = {str(IMT_max)} : {upper_bound_value}") - return None + if np.sign(lower_bound_value) == np.sign(upper_bound_value): msg = "Function values at the interval endpoints must differ in sign for fsolve to work. Expand the interval or use a different model."