From 3f17c77db47a912e8f90579cabc4593efdea25bf Mon Sep 17 00:00:00 2001
From: Colm Talbot <colm.talbot@ligo.org>
Date: Fri, 14 Dec 2018 00:37:13 -0600
Subject: [PATCH] Resolve "Calculate time_delay_from_geocenter with coalescence
 time"

---
 bilby/gw/detector.py       | 4 +---
 test/gw_likelihood_test.py | 4 ++--
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/bilby/gw/detector.py b/bilby/gw/detector.py
index 22845a6d2..39cf66b56 100644
--- a/bilby/gw/detector.py
+++ b/bilby/gw/detector.py
@@ -1280,9 +1280,7 @@ class Interferometer(object):
         signal_ifo *= self.strain_data.frequency_mask
 
         time_shift = self.time_delay_from_geocenter(
-            parameters['ra'],
-            parameters['dec'],
-            self.strain_data.start_time)
+            parameters['ra'], parameters['dec'], parameters['geocent_time'])
         dt = parameters['geocent_time'] + time_shift - self.strain_data.start_time
 
         signal_ifo = signal_ifo * np.exp(
diff --git a/test/gw_likelihood_test.py b/test/gw_likelihood_test.py
index 6380d27aa..4215bcf98 100644
--- a/test/gw_likelihood_test.py
+++ b/test/gw_likelihood_test.py
@@ -43,7 +43,7 @@ class TestBasicGWTransient(unittest.TestCase):
         """Test log likelihood matches precomputed value"""
         self.likelihood.log_likelihood()
         self.assertAlmostEqual(self.likelihood.log_likelihood(),
-                               -4048.5113284032036, 3)
+                               -4054.2229111227016, 3)
 
     def test_log_likelihood_ratio(self):
         """Test log likelihood ratio returns the correct value"""
@@ -113,7 +113,7 @@ class TestGWTransient(unittest.TestCase):
         """Test log likelihood matches precomputed value"""
         self.likelihood.log_likelihood()
         self.assertAlmostEqual(self.likelihood.log_likelihood(),
-                               -4048.5113284032036, 3)
+                               -4054.2229111227016, 3)
 
     def test_log_likelihood_ratio(self):
         """Test log likelihood ratio returns the correct value"""
-- 
GitLab