getSNR: demean using only mean determined from noise window.

This commit is contained in:
Ludger Küperkoch 2015-06-25 10:07:35 +02:00
parent 2cd7572ee4
commit c9f07b6540

View File

@ -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])))