From e65bca6f6eef73d609abf0ed12d978137091a476 Mon Sep 17 00:00:00 2001
From: "gregory.ashton" <gregory.ashton@ligo.org>
Date: Fri, 21 Oct 2016 09:47:20 +0200
Subject: [PATCH] Removes erroneous - in BSGL floor calculation

---
 pyfstat.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pyfstat.py b/pyfstat.py
index 3bdda11..b274065 100755
--- a/pyfstat.py
+++ b/pyfstat.py
@@ -310,7 +310,7 @@ class ComputeFstat(object):
         if self.BSGL:
             if len(names) < 2:
                 raise ValueError("Can't use BSGL with single detector data")
-            logging.info('Initialising BSGL with prefactor {:2.2f} and floor'
+            logging.info('Initialising BSGL with prefactor {:2.2f} and floor '
                          '{:2.2f}'.format(self.BSGL_PREFACTOR, self.BSGL_FLOOR)
                          )
             # Tuning parameters - to be reviewed
@@ -368,8 +368,8 @@ class ComputeFstat(object):
             self.twoFX[1] = self.FstatResults.twoFPerDet(1)
             BSGL = lalpulsar.ComputeBSGL(twoF, self.twoFX,
                                          self.BSGLSetup)
-            if self.BSGL_FLOOR and BSGL < self.BSGL_FLOOR:
-                return -self.BSGL_FLOOR
+            if self.BSGL_FLOOR is not None and BSGL < self.BSGL_FLOOR:
+                return self.BSGL_FLOOR
             else:
                 return self.BSGL_PREFACTOR * BSGL/np.log10(np.exp(1))
 
-- 
GitLab