Skip to content

Commit

Permalink
Update seismic_ops.py
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuwq0 authored Mar 9, 2024
1 parent f4df331 commit c16940a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gamma/seismic_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def grad_traveltime(event_loc, station_loc, phase_type, eikonal):
dt_dz[p_index] = _interp(eikonal["grad_up"][1], r[p_index], z[p_index], rgrid0, zgrid0, nr, nz, h)
dt_dz[s_index] = _interp(eikonal["grad_us"][1], r[s_index], z[s_index], rgrid0, zgrid0, nr, nz, h)

dr_dxy = (event_loc[:, :-2] - station_loc[:, :-1]) / (r[:, np.newaxis] + 1e-6)
dr_dxy = (event_loc[:, :2] - station_loc[:, :2]) / (r[:, np.newaxis] + 1e-6)
dt_dxy = dt_dr[:, np.newaxis] * dr_dxy

grad = np.column_stack((dt_dxy, dt_dz[:, np.newaxis]))
Expand Down

0 comments on commit c16940a

Please sign in to comment.