Skip to content
Open
34 changes: 17 additions & 17 deletions test/gw/likelihood_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def setUp(self):
self.priors = bilby.gw.prior.BBHPriorDict()
self.priors.pop("mass_1")
self.priors.pop("mass_2")
# Testing is done with the 4s IMRPhenomPV2 ROQ basis
# Testing is done with the 4s IMRPhenomPv2 ROQ basis
self.priors["chirp_mass"] = bilby.core.prior.Uniform(12.299703, 45)
self.priors["mass_ratio"] = bilby.core.prior.Uniform(0.125, 1)
self.priors["geocent_time"] = bilby.core.prior.Uniform(1.19, 1.21)
Expand Down Expand Up @@ -583,7 +583,7 @@ def test_rescaling(self):
self.priors = bilby.gw.prior.BBHPriorDict()
self.priors.pop("mass_1")
self.priors.pop("mass_2")
# Testing is done with the 4s IMRPhenomPV2 ROQ basis
# Testing is done with the 4s IMRPhenomPv2 ROQ basis
self.priors["chirp_mass"] = bilby.core.prior.Uniform(
12.299703 / scale_factor, 45 / scale_factor
)
Expand Down Expand Up @@ -631,7 +631,7 @@ def setUp(self):
self.sampling_frequency = 2048
self.duration = 16
self.reference_frequency = 20.0
self.waveform_approximant = "IMRPhenomD"
self.waveform_approximant = "IMRPhenomXAS"
# The SNRs of injections are 130-160 for roq_scale_factor=1 and 70-80 for roq_scale_factor=2
self.injection_parameters = dict(
mass_ratio=0.8,
Expand Down Expand Up @@ -942,7 +942,7 @@ def test_from_hdf5(self, basis_linear, basis_quadratic):
duration = 16
geocent_time = 1.2
reference_frequency = 20.0
waveform_approximant = "IMRPhenomD"
waveform_approximant = "IMRPhenomXAS"
mc_range = [8, 14]

priors = bilby.gw.prior.BBHPriorDict()
Expand Down Expand Up @@ -1194,7 +1194,7 @@ def create_likelihood_multiple_bases(self, multiband):
duration = 16
geocent_time = 1.2
reference_frequency = 20.0
waveform_approximant = "IMRPhenomD"
waveform_approximant = "IMRPhenomXAS"
mc_range = [8, 14]

priors = bilby.gw.prior.BBHPriorDict()
Expand Down Expand Up @@ -1310,10 +1310,10 @@ def tearDown(self):
)

@parameterized.expand([
("IMRPhenomD", True, 2, False, 1.5e-2),
("IMRPhenomD", True, 2, True, 1.5e-2),
("IMRPhenomD", False, 2, False, 5e-3),
("IMRPhenomD", False, 2, True, 6e-3),
("IMRPhenomXAS", True, 2, False, 1.5e-2),
("IMRPhenomXAS", True, 2, True, 1.5e-2),
("IMRPhenomXAS", False, 2, False, 5e-3),
("IMRPhenomXAS", False, 2, True, 6e-3),
("IMRPhenomHM", False, 4, False, 8e-4),
("IMRPhenomHM", False, 4, True, 1e-3)
])
Expand Down Expand Up @@ -1362,7 +1362,7 @@ def test_large_accuracy_factor(self):
"""
Check if larger accuracy factor increases the accuracy.
"""
waveform_approximant = "IMRPhenomD"
waveform_approximant = "IMRPhenomXAS"
wfg = bilby.gw.WaveformGenerator(
duration=self.duration, sampling_frequency=self.sampling_frequency,
frequency_domain_source_model=bilby.gw.source.lal_binary_black_hole,
Expand Down Expand Up @@ -1408,7 +1408,7 @@ def test_reference_chirp_mass_from_prior(self):
duration=self.duration, sampling_frequency=self.sampling_frequency,
frequency_domain_source_model=bilby.gw.source.binary_black_hole_frequency_sequence,
waveform_arguments=dict(
reference_frequency=self.fmin, waveform_approximant="IMRPhenomD"
reference_frequency=self.fmin, waveform_approximant="IMRPhenomXAS"
)
)
likelihood1 = bilby.gw.likelihood.MBGravitationalWaveTransient(
Expand All @@ -1430,7 +1430,7 @@ def test_no_reference_chirp_mass(self):
duration=self.duration, sampling_frequency=self.sampling_frequency,
frequency_domain_source_model=bilby.gw.source.binary_black_hole_frequency_sequence,
waveform_arguments=dict(
reference_frequency=self.fmin, waveform_approximant="IMRPhenomD"
reference_frequency=self.fmin, waveform_approximant="IMRPhenomXAS"
)
)
with self.assertRaises(TypeError):
Expand All @@ -1446,7 +1446,7 @@ def test_cannot_determine_reference_chirp_mass(self):
duration=self.duration, sampling_frequency=self.sampling_frequency,
frequency_domain_source_model=bilby.gw.source.binary_black_hole_frequency_sequence,
waveform_arguments=dict(
reference_frequency=self.fmin, waveform_approximant="IMRPhenomD"
reference_frequency=self.fmin, waveform_approximant="IMRPhenomXAS"
)
)
for key in ["chirp_mass", "mass_1", "mass_2"]:
Expand All @@ -1463,7 +1463,7 @@ def test_inout_weights(self, linear_interpolation):
Check if multiband weights can be saved as a file, and a likelihood object constructed from the weights file
produces the same likelihood value.
"""
waveform_approximant = "IMRPhenomD"
waveform_approximant = "IMRPhenomXAS"
wfg = bilby.gw.WaveformGenerator(
duration=self.duration, sampling_frequency=self.sampling_frequency,
frequency_domain_source_model=bilby.gw.source.lal_binary_black_hole,
Expand Down Expand Up @@ -1519,7 +1519,7 @@ def test_from_dict_weights(self, linear_interpolation):
"""
Check if a likelihood object constructed from dictionary-like weights produce the same likelihood value
"""
waveform_approximant = "IMRPhenomD"
waveform_approximant = "IMRPhenomXAS"
wfg = bilby.gw.WaveformGenerator(
duration=self.duration, sampling_frequency=self.sampling_frequency,
frequency_domain_source_model=bilby.gw.source.lal_binary_black_hole,
Expand Down Expand Up @@ -1565,8 +1565,8 @@ def test_from_dict_weights(self, linear_interpolation):
self.assertAlmostEqual(llr, llr_from_weights)

@parameterized.expand([
("IMRPhenomD", True, 2, False, 1e-2),
("IMRPhenomD", True, 2, True, 1e-2),
("IMRPhenomXAS", True, 2, False, 1e-2),
("IMRPhenomXAS", True, 2, True, 1e-2),
("IMRPhenomHM", False, 4, False, 5e-3),
])
def test_matches_original_likelihood_low_maximum_frequency(
Expand Down
2 changes: 1 addition & 1 deletion test/gw/plot_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def setUp(self):
frequency_domain_source_model=bilby.gw.source.lal_binary_black_hole,
time_domain_source_model=None,
waveform_arguments=dict(
reference_frequency=20.0, waveform_approximant="IMRPhenomPv2"
reference_frequency=20.0, waveform_approximant="IMRPhenomXPHM"
),
interferometers=dict(
H1=dict(optimal_SNR=1, parameters=injection_parameters),
Expand Down
2 changes: 1 addition & 1 deletion test/gw/result_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def setUp(self):
time_marginalization=True,
frequency_domain_source_model=bilby.gw.source.lal_binary_black_hole,
waveform_arguments=dict(
reference_frequency=20.0, waveform_approximant="IMRPhenomPv2"
reference_frequency=20.0, waveform_approximant="IMRPhenomXPHM"
),
interferometers=dict(
H1=dict(optimal_SNR=1, parameters=injection_parameters),
Expand Down
14 changes: 7 additions & 7 deletions test/gw/source_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def setUp(self):
phase=0.0,
)
self.waveform_kwargs = dict(
waveform_approximant="IMRPhenomPv2",
waveform_approximant="IMRPhenomXPHM",
reference_frequency=50.0,
minimum_frequency=20.0,
catch_waveform_errors=True,
Expand Down Expand Up @@ -212,7 +212,7 @@ def setUp(self):
lambda_2=100.0,
)
self.waveform_kwargs = dict(
waveform_approximant="IMRPhenomPv2_NRTidal",
waveform_approximant="IMRPhenomPv2_NRTidalv2",
reference_frequency=50.0,
minimum_frequency=20.0,
)
Expand Down Expand Up @@ -479,7 +479,7 @@ def setUp(self):
self.full_frequencies_to_sequence = self.frequency_array >= self.minimum_frequency
self.frequencies = self.frequency_array[self.full_frequencies_to_sequence]
self.waveform_kwargs = dict(
waveform_approximant="IMRPhenomPv2_NRTidal",
waveform_approximant="IMRPhenomPv2_NRTidalv2",
reference_frequency=50.0,
)

Expand Down Expand Up @@ -538,14 +538,14 @@ def setUp(self):
phase=0.0,
)
self.waveform_kwargs_fiducial = dict(
waveform_approximant="IMRPhenomPv2",
waveform_approximant="IMRPhenomXPHM",
reference_frequency=50.0,
minimum_frequency=20.0,
catch_waveform_errors=True,
fiducial=True,
)
self.waveform_kwargs_binned = dict(
waveform_approximant="IMRPhenomPv2",
waveform_approximant="IMRPhenomXPHM",
reference_frequency=50.0,
minimum_frequency=20.0,
catch_waveform_errors=True,
Expand Down Expand Up @@ -653,13 +653,13 @@ def setUp(self):
lambda_2=100.0,
)
self.waveform_kwargs_fiducial = dict(
waveform_approximant="IMRPhenomPv2_NRTidal",
waveform_approximant="IMRPhenomPv2_NRTidalv2",
reference_frequency=50.0,
minimum_frequency=20.0,
fiducial=True,
)
self.waveform_kwargs_binned = dict(
waveform_approximant="IMRPhenomPv2_NRTidal",
waveform_approximant="IMRPhenomPv2_NRTidalv2",
reference_frequency=50.0,
minimum_frequency=20.0,
fiducial=False,
Expand Down
2 changes: 1 addition & 1 deletion test/gw/utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def test_lalsim_SimInspiralChooseFDWaveform(self):
1000,
20,
None,
lalsim.IMRPhenomPv2,
lalsim.IMRPhenomXPHM,
)
self.assertEqual(len(a), 2)
self.assertEqual(type(a[0]), lal.COMPLEX16FrequencySeries)
Expand Down
2 changes: 1 addition & 1 deletion test/integration/make_standard_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
luminosity_distance=100.0,
theta_jn=0.4,
phase=1.3,
waveform_approximant="IMRPhenomPv2",
waveform_approximant="IMRPhenomXPHM",
reference_frequency=50.0,
ra=1.375,
dec=-1.2108,
Expand Down
2 changes: 1 addition & 1 deletion test/integration/sample_from_the_prior_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def test_fifteen_dimensional_cbc(self):
bilby.core.utils.random.seed(8817021)

waveform_arguments = dict(
waveform_approximant="IMRPhenomPv2",
waveform_approximant="IMRPhenomXPHM",
reference_frequency=50.0,
minimum_frequency=20.0,
)
Expand Down
16 changes: 8 additions & 8 deletions test/integration/test_waveforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,20 @@ def setUp(self):
lambda_2=1500,
)

def test_IMRPhenomPv2(self):
waveform_approximant = "IMRPhenomPv2"
def test_IMRPhenomXPHM(self):
waveform_approximant = "IMRPhenomXPHM"
self.run_for_approximant(waveform_approximant, source="bbh")

def test_IMRPhenomD(self):
waveform_approximant = "IMRPhenomD"
def test_IMRPhenomXAS(self):
waveform_approximant = "IMRPhenomXAS"
self.run_for_approximant(waveform_approximant, source="bbh")

def test_IMRPhenomPv2_NRTidal(self):
waveform_approximant = "IMRPhenomPv2_NRTidal"
def test_IMRPhenomPv2_NRTidalv2(self):
waveform_approximant = "IMRPhenomPv2_NRTidalv2"
self.run_for_approximant(waveform_approximant, source="bns")

def test_IMRPhenomD_NRTidal(self):
waveform_approximant = "IMRPhenomD_NRTidal"
def test_IMRPhenomD_NRTidalv2(self):
waveform_approximant = "IMRPhenomD_NRTidalv2"
self.run_for_approximant(waveform_approximant, source="bns")

def test_TaylorF2(self):
Expand Down
Loading