Update src/seismic_hazard_forecasting.py
This commit is contained in:
@@ -26,8 +26,6 @@ def my_trivial_task(x):
|
||||
|
||||
def compute_IMT_exceedance(rx_lat, rx_lon, r, fr, p, lambdas, D, percentages_D, magnitudes, magnitude_pdf, magnitude_cdf, model, imt='PGA', IMT_min=0.01, IMT_max=2.0, rx_label=None, rtol=0.1, use_cython=False, **kwargs):
|
||||
|
||||
return None
|
||||
|
||||
n_events = len(r)
|
||||
|
||||
try:
|
||||
@@ -148,7 +146,7 @@ def compute_IMT_exceedance(rx_lat, rx_lon, r, fr, p, lambdas, D, percentages_D,
|
||||
|
||||
return exceedance_prob_sum - p
|
||||
|
||||
|
||||
return None
|
||||
|
||||
# Check function values at different test points
|
||||
IMT_mid = (IMT_max-IMT_min)/2
|
||||
@@ -678,13 +676,15 @@ verbose: {verbose}")
|
||||
end = timer()
|
||||
logger.info(f"Ground motion exceedance computation time: {round(end - start, 1)} seconds")
|
||||
|
||||
logger.info("Test3 run finished")
|
||||
sys.exit()
|
||||
|
||||
if np.isnan(iml_grid_raw).all():
|
||||
msg = "No valid ground motion intensity measures were forecasted. Try a different ground motion model."
|
||||
logger.error(msg)
|
||||
raise Exception(msg)
|
||||
|
||||
logger.info("Test3 run finished")
|
||||
sys.exit()
|
||||
|
||||
|
||||
# create list of one empty list for each imt
|
||||
iml_grid = [[] for _ in range(len(products))] # final ground motion grids
|
||||
|
Reference in New Issue
Block a user