Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuwq0 committed Aug 16, 2024
1 parent 36de535 commit f9bb413
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
9 changes: 4 additions & 5 deletions adloc/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ def invert(picks, stations, config, estimator, event_index, event_init):
"""

def is_model_valid(estimator, X, y):
## TODO: Implement a good way to check if the model is valid
# score = estimator.score(X, y)
# return score > config["min_score"]
# events [[x, y, z, t]]
return estimator.events[0][2] > 1.0 # depth > 1.0 km
check = True
check = check and (estimator.events[0][2] > 1.0) # depth > 1.0 km
check = check and (estimator.score(X, y) > config["min_score"])
return check

def is_data_valid(X, y):
"""
Expand Down
7 changes: 4 additions & 3 deletions docs/run_ransac.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,14 @@
config["eikonal"] = init_eikonal2d(config["eikonal"])

# %% config for location
config["min_picks"] = 8
config["min_picks"] = 5
config["min_picks_ratio"] = 0.2
config["max_residual_time"] = 1.0
config["max_residual_amplitude"] = 1.0
config["min_score"] = 0.6
config["min_s_picks"] = 2
config["min_p_picks"] = 2
config["min_p_picks"] = 1
config["min_s_picks"] = 1


config["bfgs_bounds"] = (
(config["xlim_km"][0] - 1, config["xlim_km"][1] + 1), # x
Expand Down

0 comments on commit f9bb413

Please sign in to comment.