getSNR: demean using only mean determined from noise window.
This commit is contained in:
parent
2cd7572ee4
commit
c9f07b6540
@ -334,8 +334,8 @@ def getSNR(X, TSNR, t1):
|
|||||||
print 'getSNR: Empty array isignal, check signal window!'
|
print 'getSNR: Empty array isignal, check signal window!'
|
||||||
return
|
return
|
||||||
|
|
||||||
# demean over entire snr window
|
# demean over entire waveform
|
||||||
x = x - np.mean(x[np.hstack([inoise, isignal])])
|
x = x - np.mean(x[inoise])
|
||||||
|
|
||||||
# calculate ratios
|
# calculate ratios
|
||||||
noiselevel = np.sqrt(np.mean(np.square(x[inoise])))
|
noiselevel = np.sqrt(np.mean(np.square(x[inoise])))
|
||||||
|
Loading…
Reference in New Issue
Block a user