Update src/seismic_hazard_forecasting.py

log message about AOI activation and fix orientation if AOI selected
This commit is contained in:
2026-06-22 14:08:10 +02:00
parent 89f3f70c62
commit b7ee8d52ab
+5 -1
View File
@@ -473,7 +473,7 @@ verbose: {verbose}")
if (None not in AOI_lat) and (None not in AOI_lon):
use_AOI = True
logger.info(f"Area of Interest (AOI) selected with latitutde range {AOI_lat} and longitude range {AOI_lon}")
#convert AOI to UTM
u_AOI = utm.from_latlon(AOI_lat, AOI_lon)
x_AOI = u_AOI[0]
@@ -836,6 +836,10 @@ verbose: {verbose}")
iml_grid_hd[iml_grid_hd == 0.0] = np.nan # change zeroes back to nan
# correct orientation is AOI is used
if use_AOI:
iml_grid_hd = np.rot90(iml_grid_hd, k=-1)
#vmin_hd = min(x for x in iml_grid_hd.flatten() if not isnan(x))
vmax_hd = max(x for x in iml_grid_hd.flatten() if not isnan(x))