PhaseNet 0.2.2__tar.gz → 0.2.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. {phasenet-0.2.2/phasenet.egg-info → phasenet-0.2.4}/PKG-INFO +1 -1
  2. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet/utils/visualization.py +3 -23
  3. {phasenet-0.2.2 → phasenet-0.2.4/phasenet.egg-info}/PKG-INFO +1 -1
  4. phasenet-0.2.4/phasenet.egg-info/entry_points.txt +3 -0
  5. {phasenet-0.2.2 → phasenet-0.2.4}/predict.py +5 -1
  6. {phasenet-0.2.2 → phasenet-0.2.4}/pyproject.toml +3 -3
  7. {phasenet-0.2.2 → phasenet-0.2.4}/train.py +5 -1
  8. phasenet-0.2.2/phasenet.egg-info/entry_points.txt +0 -3
  9. {phasenet-0.2.2 → phasenet-0.2.4}/.github/workflows/publish.yml +0 -0
  10. {phasenet-0.2.2 → phasenet-0.2.4}/.gitignore +0 -0
  11. {phasenet-0.2.2 → phasenet-0.2.4}/README.md +0 -0
  12. {phasenet-0.2.2 → phasenet-0.2.4}/docs/notebooks/lab2a_phasenet_das_inference.ipynb +0 -0
  13. {phasenet-0.2.2 → phasenet-0.2.4}/docs/notebooks/lab2b_pick_association.ipynb +0 -0
  14. {phasenet-0.2.2 → phasenet-0.2.4}/docs/notebooks/lab2c_semisupervised_training.ipynb +0 -0
  15. {phasenet-0.2.2 → phasenet-0.2.4}/examples/ceed_training_plots.py +0 -0
  16. {phasenet-0.2.2 → phasenet-0.2.4}/examples/italy/prepare_inventory.py +0 -0
  17. {phasenet-0.2.2 → phasenet-0.2.4}/examples/italy/prepare_mseed_list.py +0 -0
  18. {phasenet-0.2.2 → phasenet-0.2.4}/examples/italy/run_all_years.sh +0 -0
  19. {phasenet-0.2.2 → phasenet-0.2.4}/examples/italy/upload_loop.sh +0 -0
  20. {phasenet-0.2.2 → phasenet-0.2.4}/examples/italy/upload_phasenet_origin.sh +0 -0
  21. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet/__init__.py +0 -0
  22. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet/data/__init__.py +0 -0
  23. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet/data/ceed.py +0 -0
  24. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet/data/das.py +0 -0
  25. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet/data/transforms.py +0 -0
  26. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet/models/__init__.py +0 -0
  27. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet/models/phasenet.py +0 -0
  28. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet/models/phasenet_das.py +0 -0
  29. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet/models/phasenet_das_plus.py +0 -0
  30. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet/models/phasenet_plus.py +0 -0
  31. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet/models/phasenet_tf.py +0 -0
  32. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet/models/phasenet_tf_plus.py +0 -0
  33. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet/models/prompt/__init__.py +0 -0
  34. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet/models/prompt/common.py +0 -0
  35. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet/models/prompt/mask_decoder.py +0 -0
  36. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet/models/prompt/prompt_encoder.py +0 -0
  37. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet/models/prompt/transformer.py +0 -0
  38. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet/models/unet.py +0 -0
  39. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet/models/unet2018.py +0 -0
  40. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet/utils/__init__.py +0 -0
  41. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet/utils/detect_peaks_cpu.py +0 -0
  42. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet/utils/inference.py +0 -0
  43. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet/utils/postprocess.py +0 -0
  44. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet.egg-info/SOURCES.txt +0 -0
  45. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet.egg-info/dependency_links.txt +0 -0
  46. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet.egg-info/requires.txt +0 -0
  47. {phasenet-0.2.2 → phasenet-0.2.4}/phasenet.egg-info/top_level.txt +0 -0
  48. {phasenet-0.2.2 → phasenet-0.2.4}/requirements.txt +0 -0
  49. {phasenet-0.2.2 → phasenet-0.2.4}/scripts/predict_ceed.py +0 -0
  50. {phasenet-0.2.2 → phasenet-0.2.4}/scripts/predict_ceed.sh +0 -0
  51. {phasenet-0.2.2 → phasenet-0.2.4}/scripts/predict_das.py +0 -0
  52. {phasenet-0.2.2 → phasenet-0.2.4}/scripts/predict_das.sh +0 -0
  53. {phasenet-0.2.2 → phasenet-0.2.4}/scripts/predict_mseed.py +0 -0
  54. {phasenet-0.2.2 → phasenet-0.2.4}/scripts/semisupervised_das.sh +0 -0
  55. {phasenet-0.2.2 → phasenet-0.2.4}/scripts/train_ceed.sh +0 -0
  56. {phasenet-0.2.2 → phasenet-0.2.4}/scripts/train_das.sh +0 -0
  57. {phasenet-0.2.2 → phasenet-0.2.4}/setup.cfg +0 -0
  58. {phasenet-0.2.2 → phasenet-0.2.4}/tests/benchmark_dataloader.py +0 -0
  59. {phasenet-0.2.2 → phasenet-0.2.4}/tests/test_augmentations.py +0 -0
  60. {phasenet-0.2.2 → phasenet-0.2.4}/tests/test_labels.py +0 -0
  61. {phasenet-0.2.2 → phasenet-0.2.4}/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: phasenet
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: A PyTorch implementation of PhaseNet for seismic and DAS phase picking
5
5
  Author: Weiqiang Zhu
6
6
  License-Expression: MIT
@@ -194,9 +194,9 @@ def plot_phasenet_das_plus_train(
194
194
  imshow_kwargs = dict(aspect="auto", interpolation="nearest")
195
195
 
196
196
  for i in range(nb):
197
- fig, axes = plt.subplots(2, 4, figsize=(20, 8))
197
+ fig, axes = plt.subplots(2, 2, figsize=(12, 8))
198
198
 
199
- # Row 1: Raw Data | Phase Label | Event Center Label | Event Time Label
199
+ # Row 1: Raw Data | Phase Label
200
200
  raw_i = raw[i].T
201
201
  vmax_raw = np.percentile(np.abs(raw_i), 95) or 1.0
202
202
  axes[0, 0].imshow(raw_i, cmap="seismic", vmin=-vmax_raw, vmax=vmax_raw, **imshow_kwargs)
@@ -208,19 +208,7 @@ def plot_phasenet_das_plus_train(
208
208
  axes[0, 1].imshow(_das_phase_rgb(y_phase_pick[i], mask=mask_i), **imshow_kwargs)
209
209
  axes[0, 1].set_title("Phase Label")
210
210
 
211
- cm = y_center_mask[i] if y_center_mask is not None else None
212
- tm = y_time_mask[i] if y_time_mask is not None else None
213
-
214
- if y_event_center is not None:
215
- _plot_event_center(axes[0, 2], fig, y_event_center[i], center_mask=cm, imshow_kwargs=imshow_kwargs)
216
- axes[0, 2].set_title("Event Center Label")
217
-
218
- et_vlim = None
219
- if y_event_time is not None and tm is not None:
220
- et_vlim = _plot_event_time(axes[0, 3], fig, y_event_time[i].T, tm.T, imshow_kwargs)
221
- axes[0, 3].set_title("Event Time Label")
222
-
223
- # Row 2: Normalized Data | Phase Pred | Event Center Pred | Event Time Pred
211
+ # Row 2: Normalized Data | Phase Pred
224
212
  norm_i = norm_data[i].T
225
213
  vmax_norm = np.percentile(np.abs(norm_i), 95) or 1.0
226
214
  axes[1, 0].imshow(norm_i, cmap="seismic", vmin=-vmax_norm, vmax=vmax_norm, **imshow_kwargs)
@@ -231,14 +219,6 @@ def plot_phasenet_das_plus_train(
231
219
  axes[1, 1].imshow(_das_phase_rgb(phase_pick[i]), **imshow_kwargs)
232
220
  axes[1, 1].set_title("Phase Pred")
233
221
 
234
- if event_center is not None:
235
- _plot_event_center(axes[1, 2], fig, event_center[i], center_mask=None, imshow_kwargs=imshow_kwargs)
236
- axes[1, 2].set_title("Event Center Pred")
237
-
238
- if event_time is not None and tm is not None:
239
- _plot_event_time(axes[1, 3], fig, event_time[i].T, tm.T, imshow_kwargs, vlim=et_vlim)
240
- axes[1, 3].set_title("Event Time Pred")
241
-
242
222
  for ax in axes.flat:
243
223
  ax.grid(True, alpha=0.3, linewidth=0.5)
244
224
  for ax in axes[1]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: phasenet
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: A PyTorch implementation of PhaseNet for seismic and DAS phase picking
5
5
  Author: Weiqiang Zhu
6
6
  License-Expression: MIT
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ phasenet-predict = predict:cli
3
+ phasenet-train = train:cli
@@ -625,6 +625,10 @@ def get_args_parser(add_help=True):
625
625
  return parser
626
626
 
627
627
 
628
- if __name__ == "__main__":
628
+ def cli():
629
629
  args = get_args_parser().parse_args()
630
630
  main(args)
631
+
632
+
633
+ if __name__ == "__main__":
634
+ cli()
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "phasenet"
7
- version = "0.2.2"
7
+ version = "0.2.4"
8
8
  description = "A PyTorch implementation of PhaseNet for seismic and DAS phase picking"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -41,8 +41,8 @@ Homepage = "https://github.com/AI4EPS/phasenet-pytorch"
41
41
  Repository = "https://github.com/AI4EPS/phasenet-pytorch"
42
42
 
43
43
  [project.scripts]
44
- phasenet-train = "train:main"
45
- phasenet-predict = "predict:main"
44
+ phasenet-train = "train:cli"
45
+ phasenet-predict = "predict:cli"
46
46
 
47
47
  [tool.setuptools]
48
48
  py-modules = ["train", "predict", "utils"]
@@ -802,6 +802,10 @@ def get_args_parser(add_help=True):
802
802
  return parser
803
803
 
804
804
 
805
- if __name__ == "__main__":
805
+ def cli():
806
806
  args = get_args_parser().parse_args()
807
807
  main(args)
808
+
809
+
810
+ if __name__ == "__main__":
811
+ cli()
@@ -1,3 +0,0 @@
1
- [console_scripts]
2
- phasenet-predict = predict:main
3
- phasenet-train = train:main
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes