ADLoc 1.0.2__tar.gz → 1.0.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ADLoc
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Description-Content-Type: text/markdown
5
5
  Requires-Dist: numpy
6
6
  Requires-Dist: h5py
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ADLoc
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Description-Content-Type: text/markdown
5
5
  Requires-Dist: numpy
6
6
  Requires-Dist: h5py
@@ -113,6 +113,13 @@ def invert(picks, stations, config, estimator, event_index, event_init):
113
113
 
114
114
  ## Location using RANSAC
115
115
  num_picks = len(X)
116
+ if num_picks < max(MIN_PICKS, int(MIN_PICKS_RATIO * num_picks)):
117
+ picks["mask"] = 0
118
+ picks["residual_time"] = 0.0
119
+ if config["use_amplitude"]:
120
+ picks["residual_amplitude"] = 0.0
121
+ return picks, None
122
+
116
123
  reg = RANSACRegressor(
117
124
  estimator=estimator,
118
125
  random_state=0,
@@ -132,7 +139,6 @@ def invert(picks, stations, config, estimator, event_index, event_init):
132
139
  message = "RANSAC could not find a valid consensus set."
133
140
  if str(e)[: len(message)] != message:
134
141
  print(e)
135
- raise
136
142
  picks["mask"] = 0
137
143
  picks["residual_time"] = 0.0
138
144
  if config["use_amplitude"]:
@@ -2,7 +2,7 @@ from setuptools import setup
2
2
 
3
3
  setup(
4
4
  name="ADLoc",
5
- version="1.0.2",
5
+ version="1.0.3",
6
6
  long_description="ADLoc",
7
7
  long_description_content_type="text/markdown",
8
8
  packages=["adloc"],
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
File without changes
File without changes
File without changes
File without changes