Update src/seismic_hazard_forecasting.py
This commit is contained in:
parent
70202603c3
commit
0eebfc619a
@ -48,7 +48,7 @@ def main(catalog_file, mc_file, pdf_file, m_file, m_select, mag_label, mc, m_max
|
||||
import logging
|
||||
from base_logger import getDefaultLogger
|
||||
from timeit import default_timer as timer
|
||||
from math import ceil, floor
|
||||
from math import ceil, floor, isnan
|
||||
import numpy as np
|
||||
import scipy
|
||||
import obspy
|
||||
@ -501,8 +501,8 @@ verbose: {verbose}")
|
||||
iml_grid_hd[iml_grid_hd == 0.0] = np.nan # change zeroes back to nan
|
||||
|
||||
# trim edges so the grid is not so blocky
|
||||
vmin_hd = min(x for x in iml_grid_hd.flatten() if not math.isnan(x))
|
||||
vmax_hd = max(x for x in iml_grid_hd.flatten() if not math.isnan(x))
|
||||
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))
|
||||
trim_thresh = vmin
|
||||
iml_grid_hd[iml_grid_hd < trim_thresh] = np.nan
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user