File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,12 @@ def _refine_theo_pick_time(
43
43
tr_envelope .normalize ()
44
44
# Cut the trace around the theoretical pick time
45
45
tr_cut = tr_envelope .copy ()
46
- cut_t0 = theo_pick_time - 0.7 * s_minus_p
47
- cut_t1 = theo_pick_time + 0.3 * s_minus_p
46
+ if phase == 'P' :
47
+ cut_t0 = theo_pick_time - 0.7 * s_minus_p
48
+ cut_t1 = theo_pick_time + 0.3 * s_minus_p
49
+ else :
50
+ cut_t0 = theo_pick_time - 0.5 * s_minus_p
51
+ cut_t1 = theo_pick_time + 0.5 * s_minus_p
48
52
tr_cut .trim (cut_t0 , cut_t1 )
49
53
# Threshold the cut trace, then cut it again up to its maximum
50
54
rms = np .sqrt (np .mean (tr_cut .data ** 2 ))
@@ -69,6 +73,7 @@ def _refine_theo_pick_time(
69
73
# Remove a linear function defined by first/last sample of the trace
70
74
tr_cut_detrend = tr_cut .copy ()
71
75
tr_cut_detrend .detrend ('simple' )
76
+ # New pick time is the time of the minimum of the detrended trace
72
77
refined_theo_pick_time = \
73
78
tr_cut_detrend .stats .starttime + \
74
79
tr_cut_detrend .times ()[np .argmin (tr_cut_detrend .data )]
You can’t perform that action at this time.
0 commit comments