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!'
|
||||
return
|
||||
|
||||
# demean over entire snr window
|
||||
x = x - np.mean(x[np.hstack([inoise, isignal])])
|
||||
# demean over entire waveform
|
||||
x = x - np.mean(x[inoise])
|
||||
|
||||
# calculate ratios
|
||||
noiselevel = np.sqrt(np.mean(np.square(x[inoise])))
|
||||
|
Loading…
Reference in New Issue
Block a user