diff --git a/pyfstat.py b/pyfstat.py index 3bdda11241845c78109f51b94c043ebb08a963a6..b274065b518bdfb0f44751c47913d8d57a91be52 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))