Datasets:
ArXiv:
DOI:
License:
Commit ·
005b0d4
1
Parent(s): 38b02ef
fix data generation error for "event" configuration
Browse filesvalue error on line 344 bc ambiguous truth value
c0_width = ((s_picks - p_picks) * self.sampling_rate / 200.0).max() if p_picks!=s_picks else 50
- quakeflow_nc.py +1 -1
quakeflow_nc.py
CHANGED
|
@@ -341,7 +341,7 @@ class QuakeFlow_NC(datasets.GeneratorBasedBuilder):
|
|
| 341 |
# center = (attrs["phase_index"][::2] + attrs["phase_index"][1::2])/2.0
|
| 342 |
## assuming only one event with both P and S picks
|
| 343 |
c0 = ((p_picks) + (s_picks)) / 2.0 # phase center
|
| 344 |
-
c0_width = ((s_picks - p_picks) * self.sampling_rate / 200.0).max() if p_picks
|
| 345 |
dx = round(
|
| 346 |
(event_attrs["longitude"] - attrs["longitude"])
|
| 347 |
* np.cos(np.radians(event_attrs["latitude"]))
|
|
|
|
| 341 |
# center = (attrs["phase_index"][::2] + attrs["phase_index"][1::2])/2.0
|
| 342 |
## assuming only one event with both P and S picks
|
| 343 |
c0 = ((p_picks) + (s_picks)) / 2.0 # phase center
|
| 344 |
+
c0_width = ((s_picks - p_picks) * self.sampling_rate / 200.0).max() if len(np.intersect1d(p_picks, s_picks)) == 0 else 50
|
| 345 |
dx = round(
|
| 346 |
(event_attrs["longitude"] - attrs["longitude"])
|
| 347 |
* np.cos(np.radians(event_attrs["latitude"]))
|