From a500503d93ee990697666532084865e1c993d199 Mon Sep 17 00:00:00 2001 From: Colm Talbot <talbotcolm@gmail.com> Date: Thu, 17 Nov 2022 08:43:01 -0500 Subject: [PATCH] TEST: relative binning time marginalisation --- bilby/gw/likelihood/relative.py | 10 ++++++++++ test/gw/likelihood/relative_binning_test.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/bilby/gw/likelihood/relative.py b/bilby/gw/likelihood/relative.py index 296e43273..ddb4d3ee8 100644 --- a/bilby/gw/likelihood/relative.py +++ b/bilby/gw/likelihood/relative.py @@ -84,6 +84,10 @@ class RelativeBinningGravitationalWaveTransient(GravitationalWaveTransient): Likelihood: `bilby.core.likelihood.Likelihood` A likelihood object, able to compute the likelihood of the data given some model parameters. + + Notes + ----- + The relative binning likelihood does not currently support calibration marginalization. """ def __init__(self, interferometers, @@ -119,6 +123,12 @@ class RelativeBinningGravitationalWaveTransient(GravitationalWaveTransient): logger.info("Drawing fiducial parameters from prior.") fiducial_parameters = priors.sample() fiducial_parameters["fiducial"] = 0 + if self.time_marginalization: + fiducial_parameters["geocent_time"] = interferometers.start_time + if self.distance_marginalization: + fiducial_parameters["luminosity_distance"] = self._ref_dist + if self.phase_marginalization: + fiducial_parameters["phase"] = 0.0 self.fiducial_parameters = fiducial_parameters self.chi = chi self.epsilon = epsilon diff --git a/test/gw/likelihood/relative_binning_test.py b/test/gw/likelihood/relative_binning_test.py index cab949000..2f1352e41 100644 --- a/test/gw/likelihood/relative_binning_test.py +++ b/test/gw/likelihood/relative_binning_test.py @@ -6,7 +6,7 @@ import numpy as np from parameterized import parameterized -class TestMBLikelihood(unittest.TestCase): +class TestRelativeBinningLikelihood(unittest.TestCase): def setUp(self): duration = 16 fmin = 20 -- GitLab