From 59c4422fbb4499524d7b1e8be351a5467c577cf2 Mon Sep 17 00:00:00 2001
From: Colm Talbot <colm.talbot@ligo.org>
Date: Thu, 26 Jul 2018 09:35:41 -0400
Subject: [PATCH] fix bug if sampling frequency isn't set

---
 tupak/gw/detector.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tupak/gw/detector.py b/tupak/gw/detector.py
index 4a479a902..842fc3733 100644
--- a/tupak/gw/detector.py
+++ b/tupak/gw/detector.py
@@ -305,8 +305,9 @@ class InterferometerStrainData(object):
     @property
     def maximum_frequency(self):
         """ Force the maximum frequency be less than the Nyquist frequency """
-        if 2 * self.__maximum_frequency > self.sampling_frequency:
-            self.__maximum_frequency = self.sampling_frequency / 2.
+        if self.sampling_frequency is not None:
+            if 2 * self.__maximum_frequency > self.sampling_frequency:
+                self.__maximum_frequency = self.sampling_frequency / 2.
         return self.__maximum_frequency
 
     @maximum_frequency.setter
-- 
GitLab