diff --git a/bilby/gw/likelihood/relative.py b/bilby/gw/likelihood/relative.py index 296e43273a37facb419e10149dcf541ca7925aa4..ddb4d3ee872b3f2c43efb181f4b3fdaba4b3db08 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 cab9490003827aa18739930817a0260558aedbf7..2f1352e4174bad7cafe3854644968b91807c40b9 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