[bugfix] make sure t and rms have same length by using np.linspace instead of np.arange

This commit is contained in:
Marcel Paffrath 2019-02-21 14:20:53 +01:00
parent 7bf3bb6835
commit 9583f9d351

View File

@ -793,8 +793,7 @@ def checksignallength(X, pick, TSNR, minsiglength, nfac, minpercent, iplot=0, fi
ilen = len(x1) ilen = len(x1)
rms = abs(x1) rms = abs(x1)
t = np.arange(0, ilen / X[0].stats.sampling_rate, t = np.linspace(0, X[0].stats.delta * ilen, ilen)
X[0].stats.delta)
# get noise window in front of pick plus saftey gap # get noise window in front of pick plus saftey gap
inoise = getnoisewin(t, pick, TSNR[0], TSNR[1]) inoise = getnoisewin(t, pick, TSNR[0], TSNR[1])