From c9f07b6540204f81a1918fa1d75fe895b9aa4c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludger=20K=C3=BCperkoch?= Date: Thu, 25 Jun 2015 10:07:35 +0200 Subject: [PATCH] getSNR: demean using only mean determined from noise window. --- pylot/core/pick/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pylot/core/pick/utils.py b/pylot/core/pick/utils.py index 8b818aa8..1bcb7469 100644 --- a/pylot/core/pick/utils.py +++ b/pylot/core/pick/utils.py @@ -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])))