fix dataset generation error

#7
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: