Update src/seismic_hazard_forecasting.py

This commit is contained in:
2025-08-25 15:09:45 +02:00
parent b06a2ab4e5
commit a65316613e

View File

@@ -185,10 +185,10 @@ def compute_IMT_exceedance(rx_lat, rx_lon, r, fr, p, lambdas, D, percentages_D,
start = timer()
try:
method='brentq'
method='brenth'
logger.debug("Now trying Scipy " + method)
#output = root_scalar(exceedance_root_function, bracket=[IMT_min, IMT_max], rtol=rtol, method=method)
output = root_scalar(exceedance_root_function, method=method)
output = root_scalar(exceedance_root_function, bracket=[IMT_min, IMT_max], rtol=rtol, method=method)
#output = root_scalar(exceedance_root_function, method=method)
gm_est = output.root
except Exception as error:
logger.error(f"An exception occurred: {error}")