Datasets:

ArXiv:
DOI:
License:
chapsticklover commited on
Commit
095cd8b
1 Parent(s): cb1efb2

fix dataset generation error

Browse files

checking if stations with 'P arrival equals S arrival' results in error when comparing arrays using '==' operator

DatasetGenerationError: An error occurred while generating the dataset

Files changed (1) hide show
  1. quakeflow_nc.py +1 -1
quakeflow_nc.py CHANGED
@@ -316,7 +316,7 @@ class QuakeFlow_NC(datasets.GeneratorBasedBuilder):
316
  is_sick = False
317
  for sta_id in station_ids:
318
  attrs = event[sta_id].attrs
319
- if attrs["phase_index"][attrs["phase_type"] == "P"] == attrs["phase_index"][attrs["phase_type"] == "S"]:
320
  is_sick = True
321
  break
322
  if is_sick:
 
316
  is_sick = False
317
  for sta_id in station_ids:
318
  attrs = event[sta_id].attrs
319
+ if not np.intersect1d(attrs["phase_index"][attrs["phase_type"] == "P"], attrs["phase_index"][attrs["phase_type"] == "S"]):
320
  is_sick = True
321
  break
322
  if is_sick: