[bugfix] determination of zero crossings breaks down if data is not demeaned in the signal window (explicitly demeaning data in the signal window when determining the zero crossings)
This commit is contained in:
parent
a95caa5efc
commit
864ef6c64d
@ -65,8 +65,8 @@ def earllatepicker(X, nfac, TSNR, Pick1, iplot=None):
|
|||||||
|
|
||||||
#get earliest possible pick
|
#get earliest possible pick
|
||||||
|
|
||||||
#determine all zero crossings in signal window
|
#determine all zero crossings in signal window (demeaned)
|
||||||
zc = crossings_nonzero_all(x[isignal])
|
zc = crossings_nonzero_all(x[isignal] - x[isignal].mean())
|
||||||
#calculate mean half period T0 of signal as the average of the
|
#calculate mean half period T0 of signal as the average of the
|
||||||
T0 = np.mean(np.diff(zc)) * X[0].stats.delta #this is half wave length!
|
T0 = np.mean(np.diff(zc)) * X[0].stats.delta #this is half wave length!
|
||||||
#T0/4 is assumed as time difference between most likely and earliest possible pick!
|
#T0/4 is assumed as time difference between most likely and earliest possible pick!
|
||||||
|
Loading…
Reference in New Issue
Block a user