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.
- {adloc-1.0.2 → adloc-1.0.3}/ADLoc.egg-info/PKG-INFO +1 -1
- {adloc-1.0.2 → adloc-1.0.3}/PKG-INFO +1 -1
- {adloc-1.0.2 → adloc-1.0.3}/adloc/utils.py +7 -1
- {adloc-1.0.2 → adloc-1.0.3}/setup.py +1 -1
- {adloc-1.0.2 → adloc-1.0.3}/ADLoc.egg-info/SOURCES.txt +0 -0
- {adloc-1.0.2 → adloc-1.0.3}/ADLoc.egg-info/dependency_links.txt +0 -0
- {adloc-1.0.2 → adloc-1.0.3}/ADLoc.egg-info/requires.txt +0 -0
- {adloc-1.0.2 → adloc-1.0.3}/ADLoc.egg-info/top_level.txt +0 -0
- {adloc-1.0.2 → adloc-1.0.3}/adloc/__init__.py +0 -0
- {adloc-1.0.2 → adloc-1.0.3}/adloc/_ransac.py +0 -0
- {adloc-1.0.2 → adloc-1.0.3}/adloc/adloc.py +0 -0
- {adloc-1.0.2 → adloc-1.0.3}/adloc/data.py +0 -0
- {adloc-1.0.2 → adloc-1.0.3}/adloc/eikonal2d.py +0 -0
- {adloc-1.0.2 → adloc-1.0.3}/adloc/eikonal3d.py +0 -0
- {adloc-1.0.2 → adloc-1.0.3}/adloc/gmpe.py +0 -0
- {adloc-1.0.2 → adloc-1.0.3}/adloc/inversion.py +0 -0
- {adloc-1.0.2 → adloc-1.0.3}/adloc/sacloc2d.py +0 -0
- {adloc-1.0.2 → adloc-1.0.3}/adloc/sacloc3d.py +0 -0
- {adloc-1.0.2 → adloc-1.0.3}/adloc/test_grad.py +0 -0
- {adloc-1.0.2 → adloc-1.0.3}/setup.cfg +0 -0
- {adloc-1.0.2 → adloc-1.0.3}/tests/test_ad.py +0 -0
|
@@ -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"]:
|
|
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
|
|
File without changes
|
|
File without changes
|