raise exception for null magnitude values
This commit is contained in:
parent
1ea6c85ab2
commit
60ae1c96cd
@ -138,6 +138,12 @@ verbose: {verbose}")
|
||||
|
||||
time, mag, lat, lon, depth = read_mat_cat(catalog_file, mag_label=mag_label, catalog_label='Catalog')
|
||||
|
||||
# check for null magnitude values
|
||||
m_null_idx = np.where(np.isnan(mag))[0]
|
||||
if len(m_null_idx) > 0:
|
||||
msg = f"There are null values in the magnitude column of the catalog at indices {m_null_idx}"
|
||||
logger.error(msg)
|
||||
raise Exception(msg)
|
||||
if mc != None:
|
||||
logger.info("Mc value provided by user")
|
||||
trim_to_mc = True
|
||||
|
Loading…
Reference in New Issue
Block a user