From 8280a5043cb0727a134cdd606f67665011dd2b65 Mon Sep 17 00:00:00 2001 From: Darius Arnold Date: Fri, 10 Nov 2017 10:23:50 +0100 Subject: [PATCH] [bugfix] snr calculation takes offset from cutting into account --- pylot/core/pick/picker.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pylot/core/pick/picker.py b/pylot/core/pick/picker.py index 31ea86f8..59855133 100644 --- a/pylot/core/pick/picker.py +++ b/pylot/core/pick/picker.py @@ -228,7 +228,9 @@ class AICPicker(AutoPicker): if self.Pick is not None: self.Data[0].data = check_counts_ms(self.Data[0].data) # calculate SNR from CF - self.SNR = getSNR(self.Data, self.TSNR, self.Pick)[0] # TODO Check wether this yields similar results + # subtract beginning of Tcf to get sample index in self.Data, which + # is cut out off trace + self.SNR = getSNR(self.Data, self.TSNR, self.Pick-self.Tcf[0])[0] # TODO Check wether this yields similar results # calculate slope from CF after initial pick try: self.slope, iislope, datafit = calcSlope(self.Data, self.aicsmooth, self.Tcf, self.Pick, self.TSNR)