Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b908c36f64 | ||
|
|
d4e8dfdbe3 | ||
|
|
046aa63f1f | ||
|
|
120ddb703d | ||
|
|
c2247ee602 |
@@ -724,7 +724,7 @@ verbose: {verbose}")
|
||||
loc_pdf = grid_gdf_latlon['location_PDF'].to_numpy() # extract the previously created location PDF from the GDF
|
||||
|
||||
# convert distances from m to km because openquake ground motion models take input distances in kilometres
|
||||
#distances_sel = distances_sel/1000.0
|
||||
distances_sel = distances_sel/1000.0
|
||||
|
||||
# For each receiver compute estimated ground motion values
|
||||
logger.info(f"Estimating ground motion intensity at {len(distances_sel)} grid points...")
|
||||
@@ -747,7 +747,7 @@ verbose: {verbose}")
|
||||
imls = [dask.delayed(compute_IMT_exceedance)(centroids_sel.iloc[i].y, centroids_sel.iloc[i].x, distances_sel[i].flatten(), loc_pdf, p, lambdas,
|
||||
forecast_len, lambdas_perc, m_range, m_pdf, m_cdf, model,
|
||||
log_level=logging.DEBUG, imt=imt, IMT_min=0.0, IMT_max=IMT_max, rx_label=i,
|
||||
rtol=0.1, use_cython=True) for i in iter]
|
||||
rtol=0.1, use_cython=False) for i in iter]
|
||||
iml = dask.compute(*imls)
|
||||
iml_grid_raw.append(list(iml))
|
||||
|
||||
@@ -837,7 +837,7 @@ verbose: {verbose}")
|
||||
|
||||
fig, ax = plt.subplots(figsize=((width + 40) / 100.0, (height + 20) / 100.0),
|
||||
dpi=100) # Increase fig size for labels
|
||||
ax.imshow(gradient, aspect='auto', cmap=cmap.reversed(),
|
||||
ax.imshow(gradient, aspect='auto', cmap="YlOrRd_r",
|
||||
extent=[0, 1, vmin, vmax]) # Note: extent order is different for vertical
|
||||
ax.set_xticks([]) # Remove x-ticks for vertical colorbar
|
||||
num_ticks = 11 # Show more ticks
|
||||
|
||||
Reference in New Issue
Block a user