From dec3e733a2afa79f3554d3786f8d9e2ffa9800ca Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Tue, 23 Jun 2015 13:23:31 +0200 Subject: [PATCH] use settings and defaults rather than hard coded parameters --- pylot/core/util/widgets.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index cbda9d37..0ff972f0 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -411,10 +411,17 @@ class PickDlg(QDialog): 'VLRW': 15. } - result = getSNR(wfdata, (5., .5, 2.), ini_pick) + settings = QSettings() + + nfac = settings.value('picking/nfac', 1.5) + noise_win = settings.value('picking/noise_win', 5.) + gap_win = settings.value('picking/gap_win', .5) + signal_win = settings.value('picking/signal_win', 1.5) + + result = getSNR(wfdata, (noise_win, gap_win, signal_win), ini_pick) snr = result[0] - noiselevel = result[2] * 1.5 + noiselevel = result[2] * nfac if snr < 1.5: x_res = res_wins['VLRW']