Skip to content

Commit

Permalink
fix deleta time
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuwq0 committed Nov 20, 2024
1 parent 980859f commit e110273
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/run_event_association.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,10 @@ def associate(

event = event.sort_values(by="num_picks", ascending=True)
ps_delta = event["travel_time_s"].values * 2 * (VPVS_RATIO - 1) / (VPVS_RATIO + 1)
t1 = event["timestamp_center"].values - ps_delta * 1.2
t2 = event["timestamp_center"].values + ps_delta * 1.2
# t1 = event["timestamp_center"].values - ps_delta * 1.1 - 1.0
# t2 = event["timestamp_center"].values + ps_delta * 1.1 + 1.0
t1 = event["timestamp_center"].values - (ps_delta * 0.6 + 1.0)
t2 = event["timestamp_center"].values + (ps_delta * 0.6 + 1.0)

picks_ = picks.loc[group_id, "timestamp"].values # (Npk, )
mask = (picks_[None, :] >= t1[:, None]) & (picks_[None, :] <= t2[:, None]) # (Nev, Npk)
Expand Down

0 comments on commit e110273

Please sign in to comment.