From 447ff6630f18f72a16dadd3c1138165a2024dbd9 Mon Sep 17 00:00:00 2001 From: Sylvia Biscoveanu <sylvia.biscoveanu@ligo.org> Date: Thu, 3 Sep 2020 10:09:29 -0500 Subject: [PATCH] Change reference distance and interpolant behavior --- bilby/gw/likelihood.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bilby/gw/likelihood.py b/bilby/gw/likelihood.py index f5817d582..f8fedb11f 100644 --- a/bilby/gw/likelihood.py +++ b/bilby/gw/likelihood.py @@ -597,8 +597,8 @@ class GravitationalWaveTransient(Likelihood): @property def _ref_dist(self): - """ Smallest distance contained in priors """ - return self._distance_array[0] + """ Median distance in priors """ + return self.priors['luminosity_distance'].rescale(0.5) @property def _optimal_snr_squared_ref_array(self): @@ -632,7 +632,7 @@ class GravitationalWaveTransient(Likelihood): self._create_lookup_table() self._interp_dist_margd_loglikelihood = UnsortedInterp2d( self._d_inner_h_ref_array, self._optimal_snr_squared_ref_array, - self._dist_margd_loglikelihood_array, kind='cubic') + self._dist_margd_loglikelihood_array, kind='cubic', fill_value=-np.inf) @property def cached_lookup_table_filename(self): -- GitLab