From 49cc8a5c7d3baf2255fed78ea626547c324b3f7d Mon Sep 17 00:00:00 2001 From: ftong Date: Fri, 22 Aug 2025 15:09:01 +0200 Subject: [PATCH] Update src/seismic_hazard_forecasting.py --- src/seismic_hazard_forecasting.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/seismic_hazard_forecasting.py b/src/seismic_hazard_forecasting.py index 33cbf73..271a1b8 100644 --- a/src/seismic_hazard_forecasting.py +++ b/src/seismic_hazard_forecasting.py @@ -185,11 +185,10 @@ def compute_IMT_exceedance(rx_lat, rx_lon, r, fr, p, lambdas, D, percentages_D, start = timer() try: - method='brenth' + method='brentq' logger.debug("Now trying Scipy " + method) - #output = root_scalar(exceedance_root_function, bracket=[IMT_min, IMT_max], rtol=rtol, method=method) - #gm_est = output.root - gm_est = np.nan + output = root_scalar(exceedance_root_function, bracket=[IMT_min, IMT_max], rtol=rtol, method=method) + gm_est = output.root except Exception as error: logger.error(f"An exception occurred: {error}") logger.info("Set ground motion value to nan")