From 8634b6f696793213d631c5e026901acc3c10486c Mon Sep 17 00:00:00 2001 From: Ann-Kristin Malz <77342869+akjm99@users.noreply.github.com> Date: Fri, 24 Jan 2025 07:19:05 -0800 Subject: [PATCH 1/7] TST: change all likelihood and waveform tests to use more recent waveforms --- test/gw/likelihood/marginalization_test.py | 12 ++-- test/gw/likelihood_test.py | 60 +++++++++---------- test/gw/plot_test.py | 2 +- test/gw/result_test.py | 2 +- test/gw/source_test.py | 16 ++--- test/gw/utils_test.py | 2 +- test/integration/make_standard_data.py | 2 +- .../integration/sample_from_the_prior_test.py | 2 +- test/integration/test_waveforms.py | 16 ++--- 9 files changed, 57 insertions(+), 57 deletions(-) diff --git a/test/gw/likelihood/marginalization_test.py b/test/gw/likelihood/marginalization_test.py index d5b1d4004..9ac61bb13 100644 --- a/test/gw/likelihood/marginalization_test.py +++ b/test/gw/likelihood/marginalization_test.py @@ -216,7 +216,7 @@ def setUp(self): waveform_arguments=dict( reference_frequency=20.0, minimum_frequency=20.0, - waveform_approximant="IMRPhenomPv2", + waveform_approximant="IMRPhenomXPHM", ) ) self.interferometers.inject_signal( @@ -231,8 +231,8 @@ def setUp(self): trial_roq_paths = [ "/roq_basis", - os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomPv2/4s"), - "/home/cbc/ROQ_data/IMRPhenomPv2/4s", + os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomXPHM/4s"), + "/home/cbc/ROQ_data/IMRPhenomXPHM/4s", ] roq_dir = None for path in trial_roq_paths: @@ -249,7 +249,7 @@ def setUp(self): start_time=1126259640, waveform_arguments=dict( reference_frequency=20.0, - waveform_approximant="IMRPhenomPv2", + waveform_approximant="IMRPhenomXPHM", frequency_nodes_linear=np.load(f"{roq_dir}/fnodes_linear.npy"), frequency_nodes_quadratic=np.load(f"{roq_dir}/fnodes_quadratic.npy"), ) @@ -265,7 +265,7 @@ def setUp(self): waveform_arguments=dict( reference_frequency=20.0, minimum_frequency=20.0, - waveform_approximant="IMRPhenomPv2", + waveform_approximant="IMRPhenomXPHM", ) ) @@ -276,7 +276,7 @@ def setUp(self): start_time=1126259640, waveform_arguments=dict( reference_frequency=20.0, - waveform_approximant="IMRPhenomPv2", + waveform_approximant="IMRPhenomXPHM", ) ) diff --git a/test/gw/likelihood_test.py b/test/gw/likelihood_test.py index 84298e1d9..67f7698de 100644 --- a/test/gw/likelihood_test.py +++ b/test/gw/likelihood_test.py @@ -283,8 +283,8 @@ def setUp(self): # Possible locations for the ROQ: in the docker image, local, or on CIT trial_roq_paths = [ "/roq_basis", - os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomPv2/4s"), - "/home/cbc/ROQ_data/IMRPhenomPv2/4s", + os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomXPHM/4s"), + "/home/cbc/ROQ_data/IMRPhenomXPHM/4s", ] roq_dir = None for path in trial_roq_paths: @@ -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 IMRPhenomXPHM 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) @@ -343,7 +343,7 @@ def setUp(self): waveform_arguments=dict( reference_frequency=20.0, minimum_frequency=20.0, - waveform_approximant="IMRPhenomPv2", + waveform_approximant="IMRPhenomXPHM", ), ) @@ -361,7 +361,7 @@ def setUp(self): frequency_nodes_linear=fnodes_linear, frequency_nodes_quadratic=fnodes_quadratic, reference_frequency=20.0, - waveform_approximant="IMRPhenomPv2", + waveform_approximant="IMRPhenomXPHM", ), ) @@ -546,8 +546,8 @@ def test_rescaling(self): # Possible locations for the ROQ: in the docker image, local, or on CIT trial_roq_paths = [ "/roq_basis", - os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomPv2/4s"), - "/home/cbc/ROQ_data/IMRPhenomPv2/4s", + os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomXPHM/4s"), + "/home/cbc/ROQ_data/IMRPhenomXPHM/4s", ] roq_dir = None for path in trial_roq_paths: @@ -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 IMRPhenomXPHM ROQ basis self.priors["chirp_mass"] = bilby.core.prior.Uniform( 12.299703 / scale_factor, 45 / scale_factor ) @@ -598,7 +598,7 @@ def test_rescaling(self): frequency_nodes_linear=fnodes_linear, frequency_nodes_quadratic=fnodes_quadratic, reference_frequency=20.0, - waveform_approximant="IMRPhenomPv2", + waveform_approximant="IMRPhenomXPHM", ), ) @@ -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, @@ -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() @@ -980,8 +980,8 @@ def test_from_npy(self, from_array): # Possible locations for the ROQ: in the docker image, local, or on CIT trial_roq_paths = [ "/roq_basis", - os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomPv2/4s"), - "/home/cbc/ROQ_data/IMRPhenomPv2/4s", + os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomXPHM/4s"), + "/home/cbc/ROQ_data/IMRPhenomXPHM/4s", ] roq_dir = None for path in trial_roq_paths: @@ -1006,7 +1006,7 @@ def test_from_npy(self, from_array): duration = 4 geocent_time = 1.2 reference_frequency = 20.0 - waveform_approximant = "IMRPhenomPv2" + waveform_approximant = "IMRPhenomXPHM" mc_range = [12.299703, 45] priors = bilby.gw.prior.BBHPriorDict() @@ -1132,8 +1132,8 @@ def create_likelihood_single_basis(self): # Possible locations for the ROQ: in the docker image, local, or on CIT trial_roq_paths = [ "/roq_basis", - os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomPv2/4s"), - "/home/cbc/ROQ_data/IMRPhenomPv2/4s", + os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomXPHM/4s"), + "/home/cbc/ROQ_data/IMRPhenomXPHM/4s", ] roq_dir = None for path in trial_roq_paths: @@ -1153,7 +1153,7 @@ def create_likelihood_single_basis(self): duration = 4 geocent_time = 1.2 reference_frequency = 20.0 - waveform_approximant = "IMRPhenomPv2" + waveform_approximant = "IMRPhenomXPHM" mc_range = [12.299703, 45] priors = bilby.gw.prior.BBHPriorDict() @@ -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() @@ -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) ]) @@ -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, @@ -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( @@ -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): @@ -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"]: @@ -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, @@ -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, @@ -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( diff --git a/test/gw/plot_test.py b/test/gw/plot_test.py index bd9414212..81a1ca084 100644 --- a/test/gw/plot_test.py +++ b/test/gw/plot_test.py @@ -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), diff --git a/test/gw/result_test.py b/test/gw/result_test.py index 73780174f..7496ee579 100644 --- a/test/gw/result_test.py +++ b/test/gw/result_test.py @@ -20,7 +20,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), diff --git a/test/gw/source_test.py b/test/gw/source_test.py index be9072fb8..c9fc5b6c9 100644 --- a/test/gw/source_test.py +++ b/test/gw/source_test.py @@ -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, @@ -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, ) @@ -325,7 +325,7 @@ def setUp(self): frequency_nodes_linear=fnodes_linear, frequency_nodes_quadratic=fnodes_quadratic, reference_frequency=50.0, - waveform_approximant="IMRPhenomPv2", + waveform_approximant="IMRPhenomXPHM", ) self.frequency_array = bilby.core.utils.create_frequency_series(2048, 4) @@ -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, ) @@ -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, @@ -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, diff --git a/test/gw/utils_test.py b/test/gw/utils_test.py index bb842cc80..6b1ca1d03 100644 --- a/test/gw/utils_test.py +++ b/test/gw/utils_test.py @@ -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) diff --git a/test/integration/make_standard_data.py b/test/integration/make_standard_data.py index 4f5d4073d..c24f3e985 100644 --- a/test/integration/make_standard_data.py +++ b/test/integration/make_standard_data.py @@ -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, diff --git a/test/integration/sample_from_the_prior_test.py b/test/integration/sample_from_the_prior_test.py index 7fce8b162..0882e352f 100644 --- a/test/integration/sample_from_the_prior_test.py +++ b/test/integration/sample_from_the_prior_test.py @@ -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, ) diff --git a/test/integration/test_waveforms.py b/test/integration/test_waveforms.py index c564c1052..9b026ff65 100644 --- a/test/integration/test_waveforms.py +++ b/test/integration/test_waveforms.py @@ -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): From ae0863095fd7d5aa2e522088f82950711530defe Mon Sep 17 00:00:00 2001 From: Ann-Kristin Malz <77342869+akjm99@users.noreply.github.com> Date: Fri, 24 Jan 2025 07:19:05 -0800 Subject: [PATCH 2/7] TST: change all likelihood and waveform tests to use more recent waveforms --- test/gw/likelihood/marginalization_test.py | 12 ++-- test/gw/likelihood_test.py | 60 +++++++++---------- test/gw/plot_test.py | 2 +- test/gw/result_test.py | 2 +- test/gw/source_test.py | 16 ++--- test/gw/utils_test.py | 2 +- test/integration/make_standard_data.py | 2 +- .../integration/sample_from_the_prior_test.py | 2 +- test/integration/test_waveforms.py | 16 ++--- 9 files changed, 57 insertions(+), 57 deletions(-) diff --git a/test/gw/likelihood/marginalization_test.py b/test/gw/likelihood/marginalization_test.py index d5b1d4004..9ac61bb13 100644 --- a/test/gw/likelihood/marginalization_test.py +++ b/test/gw/likelihood/marginalization_test.py @@ -216,7 +216,7 @@ def setUp(self): waveform_arguments=dict( reference_frequency=20.0, minimum_frequency=20.0, - waveform_approximant="IMRPhenomPv2", + waveform_approximant="IMRPhenomXPHM", ) ) self.interferometers.inject_signal( @@ -231,8 +231,8 @@ def setUp(self): trial_roq_paths = [ "/roq_basis", - os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomPv2/4s"), - "/home/cbc/ROQ_data/IMRPhenomPv2/4s", + os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomXPHM/4s"), + "/home/cbc/ROQ_data/IMRPhenomXPHM/4s", ] roq_dir = None for path in trial_roq_paths: @@ -249,7 +249,7 @@ def setUp(self): start_time=1126259640, waveform_arguments=dict( reference_frequency=20.0, - waveform_approximant="IMRPhenomPv2", + waveform_approximant="IMRPhenomXPHM", frequency_nodes_linear=np.load(f"{roq_dir}/fnodes_linear.npy"), frequency_nodes_quadratic=np.load(f"{roq_dir}/fnodes_quadratic.npy"), ) @@ -265,7 +265,7 @@ def setUp(self): waveform_arguments=dict( reference_frequency=20.0, minimum_frequency=20.0, - waveform_approximant="IMRPhenomPv2", + waveform_approximant="IMRPhenomXPHM", ) ) @@ -276,7 +276,7 @@ def setUp(self): start_time=1126259640, waveform_arguments=dict( reference_frequency=20.0, - waveform_approximant="IMRPhenomPv2", + waveform_approximant="IMRPhenomXPHM", ) ) diff --git a/test/gw/likelihood_test.py b/test/gw/likelihood_test.py index 84298e1d9..67f7698de 100644 --- a/test/gw/likelihood_test.py +++ b/test/gw/likelihood_test.py @@ -283,8 +283,8 @@ def setUp(self): # Possible locations for the ROQ: in the docker image, local, or on CIT trial_roq_paths = [ "/roq_basis", - os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomPv2/4s"), - "/home/cbc/ROQ_data/IMRPhenomPv2/4s", + os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomXPHM/4s"), + "/home/cbc/ROQ_data/IMRPhenomXPHM/4s", ] roq_dir = None for path in trial_roq_paths: @@ -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 IMRPhenomXPHM 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) @@ -343,7 +343,7 @@ def setUp(self): waveform_arguments=dict( reference_frequency=20.0, minimum_frequency=20.0, - waveform_approximant="IMRPhenomPv2", + waveform_approximant="IMRPhenomXPHM", ), ) @@ -361,7 +361,7 @@ def setUp(self): frequency_nodes_linear=fnodes_linear, frequency_nodes_quadratic=fnodes_quadratic, reference_frequency=20.0, - waveform_approximant="IMRPhenomPv2", + waveform_approximant="IMRPhenomXPHM", ), ) @@ -546,8 +546,8 @@ def test_rescaling(self): # Possible locations for the ROQ: in the docker image, local, or on CIT trial_roq_paths = [ "/roq_basis", - os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomPv2/4s"), - "/home/cbc/ROQ_data/IMRPhenomPv2/4s", + os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomXPHM/4s"), + "/home/cbc/ROQ_data/IMRPhenomXPHM/4s", ] roq_dir = None for path in trial_roq_paths: @@ -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 IMRPhenomXPHM ROQ basis self.priors["chirp_mass"] = bilby.core.prior.Uniform( 12.299703 / scale_factor, 45 / scale_factor ) @@ -598,7 +598,7 @@ def test_rescaling(self): frequency_nodes_linear=fnodes_linear, frequency_nodes_quadratic=fnodes_quadratic, reference_frequency=20.0, - waveform_approximant="IMRPhenomPv2", + waveform_approximant="IMRPhenomXPHM", ), ) @@ -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, @@ -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() @@ -980,8 +980,8 @@ def test_from_npy(self, from_array): # Possible locations for the ROQ: in the docker image, local, or on CIT trial_roq_paths = [ "/roq_basis", - os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomPv2/4s"), - "/home/cbc/ROQ_data/IMRPhenomPv2/4s", + os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomXPHM/4s"), + "/home/cbc/ROQ_data/IMRPhenomXPHM/4s", ] roq_dir = None for path in trial_roq_paths: @@ -1006,7 +1006,7 @@ def test_from_npy(self, from_array): duration = 4 geocent_time = 1.2 reference_frequency = 20.0 - waveform_approximant = "IMRPhenomPv2" + waveform_approximant = "IMRPhenomXPHM" mc_range = [12.299703, 45] priors = bilby.gw.prior.BBHPriorDict() @@ -1132,8 +1132,8 @@ def create_likelihood_single_basis(self): # Possible locations for the ROQ: in the docker image, local, or on CIT trial_roq_paths = [ "/roq_basis", - os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomPv2/4s"), - "/home/cbc/ROQ_data/IMRPhenomPv2/4s", + os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomXPHM/4s"), + "/home/cbc/ROQ_data/IMRPhenomXPHM/4s", ] roq_dir = None for path in trial_roq_paths: @@ -1153,7 +1153,7 @@ def create_likelihood_single_basis(self): duration = 4 geocent_time = 1.2 reference_frequency = 20.0 - waveform_approximant = "IMRPhenomPv2" + waveform_approximant = "IMRPhenomXPHM" mc_range = [12.299703, 45] priors = bilby.gw.prior.BBHPriorDict() @@ -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() @@ -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) ]) @@ -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, @@ -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( @@ -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): @@ -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"]: @@ -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, @@ -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, @@ -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( diff --git a/test/gw/plot_test.py b/test/gw/plot_test.py index bd9414212..81a1ca084 100644 --- a/test/gw/plot_test.py +++ b/test/gw/plot_test.py @@ -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), diff --git a/test/gw/result_test.py b/test/gw/result_test.py index 98a7ce52f..c9eb0ce67 100644 --- a/test/gw/result_test.py +++ b/test/gw/result_test.py @@ -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), diff --git a/test/gw/source_test.py b/test/gw/source_test.py index be9072fb8..c9fc5b6c9 100644 --- a/test/gw/source_test.py +++ b/test/gw/source_test.py @@ -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, @@ -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, ) @@ -325,7 +325,7 @@ def setUp(self): frequency_nodes_linear=fnodes_linear, frequency_nodes_quadratic=fnodes_quadratic, reference_frequency=50.0, - waveform_approximant="IMRPhenomPv2", + waveform_approximant="IMRPhenomXPHM", ) self.frequency_array = bilby.core.utils.create_frequency_series(2048, 4) @@ -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, ) @@ -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, @@ -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, diff --git a/test/gw/utils_test.py b/test/gw/utils_test.py index cf78849c7..8f2749ebf 100644 --- a/test/gw/utils_test.py +++ b/test/gw/utils_test.py @@ -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) diff --git a/test/integration/make_standard_data.py b/test/integration/make_standard_data.py index 4f5d4073d..c24f3e985 100644 --- a/test/integration/make_standard_data.py +++ b/test/integration/make_standard_data.py @@ -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, diff --git a/test/integration/sample_from_the_prior_test.py b/test/integration/sample_from_the_prior_test.py index 7fce8b162..0882e352f 100644 --- a/test/integration/sample_from_the_prior_test.py +++ b/test/integration/sample_from_the_prior_test.py @@ -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, ) diff --git a/test/integration/test_waveforms.py b/test/integration/test_waveforms.py index c564c1052..9b026ff65 100644 --- a/test/integration/test_waveforms.py +++ b/test/integration/test_waveforms.py @@ -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): From bb82c36e7ee326b2651562849df477c908e8c855 Mon Sep 17 00:00:00 2001 From: Ann-Kristin Malz <77342869+akjm99@users.noreply.github.com> Date: Tue, 4 Feb 2025 05:13:23 -0800 Subject: [PATCH 3/7] TST: update waveforms --- test/gw/likelihood/marginalization_test.py | 4 ++-- test/gw/likelihood_test.py | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/test/gw/likelihood/marginalization_test.py b/test/gw/likelihood/marginalization_test.py index 9ac61bb13..c615e9e34 100644 --- a/test/gw/likelihood/marginalization_test.py +++ b/test/gw/likelihood/marginalization_test.py @@ -231,8 +231,8 @@ def setUp(self): trial_roq_paths = [ "/roq_basis", - os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomXPHM/4s"), - "/home/cbc/ROQ_data/IMRPhenomXPHM/4s", + os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomPv2/4s"), + "/home/cbc/ROQ_data/IMRPhenomPv2/4s", ] roq_dir = None for path in trial_roq_paths: diff --git a/test/gw/likelihood_test.py b/test/gw/likelihood_test.py index 67f7698de..f0e3023f7 100644 --- a/test/gw/likelihood_test.py +++ b/test/gw/likelihood_test.py @@ -283,8 +283,8 @@ def setUp(self): # Possible locations for the ROQ: in the docker image, local, or on CIT trial_roq_paths = [ "/roq_basis", - os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomXPHM/4s"), - "/home/cbc/ROQ_data/IMRPhenomXPHM/4s", + os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomPv2/4s"), + "/home/cbc/ROQ_data/IMRPhenomPv2/4s", ] roq_dir = None for path in trial_roq_paths: @@ -546,8 +546,8 @@ def test_rescaling(self): # Possible locations for the ROQ: in the docker image, local, or on CIT trial_roq_paths = [ "/roq_basis", - os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomXPHM/4s"), - "/home/cbc/ROQ_data/IMRPhenomXPHM/4s", + os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomPv2/4s"), + "/home/cbc/ROQ_data/IMRPhenomPv2/4s", ] roq_dir = None for path in trial_roq_paths: @@ -980,8 +980,8 @@ def test_from_npy(self, from_array): # Possible locations for the ROQ: in the docker image, local, or on CIT trial_roq_paths = [ "/roq_basis", - os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomXPHM/4s"), - "/home/cbc/ROQ_data/IMRPhenomXPHM/4s", + os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomPv2/4s"), + "/home/cbc/ROQ_data/IMRPhenomPv2/4s", ] roq_dir = None for path in trial_roq_paths: @@ -1132,8 +1132,8 @@ def create_likelihood_single_basis(self): # Possible locations for the ROQ: in the docker image, local, or on CIT trial_roq_paths = [ "/roq_basis", - os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomXPHM/4s"), - "/home/cbc/ROQ_data/IMRPhenomXPHM/4s", + os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomPv2/4s"), + "/home/cbc/ROQ_data/IMRPhenomPv2/4s", ] roq_dir = None for path in trial_roq_paths: From 9451577a285cd4bab4f3bad359a854fe0a857040 Mon Sep 17 00:00:00 2001 From: Ann-Kristin Malz <77342869+akjm99@users.noreply.github.com> Date: Tue, 4 Feb 2025 05:35:55 -0800 Subject: [PATCH 4/7] TST: update waveforms --- test/gw/likelihood/marginalization_test.py | 4 ++-- test/gw/likelihood_test.py | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/test/gw/likelihood/marginalization_test.py b/test/gw/likelihood/marginalization_test.py index 9ac61bb13..c615e9e34 100644 --- a/test/gw/likelihood/marginalization_test.py +++ b/test/gw/likelihood/marginalization_test.py @@ -231,8 +231,8 @@ def setUp(self): trial_roq_paths = [ "/roq_basis", - os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomXPHM/4s"), - "/home/cbc/ROQ_data/IMRPhenomXPHM/4s", + os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomPv2/4s"), + "/home/cbc/ROQ_data/IMRPhenomPv2/4s", ] roq_dir = None for path in trial_roq_paths: diff --git a/test/gw/likelihood_test.py b/test/gw/likelihood_test.py index 67f7698de..f0e3023f7 100644 --- a/test/gw/likelihood_test.py +++ b/test/gw/likelihood_test.py @@ -283,8 +283,8 @@ def setUp(self): # Possible locations for the ROQ: in the docker image, local, or on CIT trial_roq_paths = [ "/roq_basis", - os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomXPHM/4s"), - "/home/cbc/ROQ_data/IMRPhenomXPHM/4s", + os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomPv2/4s"), + "/home/cbc/ROQ_data/IMRPhenomPv2/4s", ] roq_dir = None for path in trial_roq_paths: @@ -546,8 +546,8 @@ def test_rescaling(self): # Possible locations for the ROQ: in the docker image, local, or on CIT trial_roq_paths = [ "/roq_basis", - os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomXPHM/4s"), - "/home/cbc/ROQ_data/IMRPhenomXPHM/4s", + os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomPv2/4s"), + "/home/cbc/ROQ_data/IMRPhenomPv2/4s", ] roq_dir = None for path in trial_roq_paths: @@ -980,8 +980,8 @@ def test_from_npy(self, from_array): # Possible locations for the ROQ: in the docker image, local, or on CIT trial_roq_paths = [ "/roq_basis", - os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomXPHM/4s"), - "/home/cbc/ROQ_data/IMRPhenomXPHM/4s", + os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomPv2/4s"), + "/home/cbc/ROQ_data/IMRPhenomPv2/4s", ] roq_dir = None for path in trial_roq_paths: @@ -1132,8 +1132,8 @@ def create_likelihood_single_basis(self): # Possible locations for the ROQ: in the docker image, local, or on CIT trial_roq_paths = [ "/roq_basis", - os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomXPHM/4s"), - "/home/cbc/ROQ_data/IMRPhenomXPHM/4s", + os.path.join(os.path.expanduser("~"), "ROQ_data/IMRPhenomPv2/4s"), + "/home/cbc/ROQ_data/IMRPhenomPv2/4s", ] roq_dir = None for path in trial_roq_paths: From f57ad688ccbb44e6ea2e1f9e54ecf10650ce23d4 Mon Sep 17 00:00:00 2001 From: Ann-Kristin Malz <77342869+akjm99@users.noreply.github.com> Date: Mon, 15 Dec 2025 04:38:13 -0800 Subject: [PATCH 5/7] BUG: update waveforms to IMRPhenomPv2 for ROQ tests --- test/gw/likelihood/marginalization_test.py | 2 +- test/gw/likelihood_test.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/gw/likelihood/marginalization_test.py b/test/gw/likelihood/marginalization_test.py index c615e9e34..af085082e 100644 --- a/test/gw/likelihood/marginalization_test.py +++ b/test/gw/likelihood/marginalization_test.py @@ -249,7 +249,7 @@ def setUp(self): start_time=1126259640, waveform_arguments=dict( reference_frequency=20.0, - waveform_approximant="IMRPhenomXPHM", + waveform_approximant="IMRPhenomPv2", frequency_nodes_linear=np.load(f"{roq_dir}/fnodes_linear.npy"), frequency_nodes_quadratic=np.load(f"{roq_dir}/fnodes_quadratic.npy"), ) diff --git a/test/gw/likelihood_test.py b/test/gw/likelihood_test.py index f0e3023f7..299e36179 100644 --- a/test/gw/likelihood_test.py +++ b/test/gw/likelihood_test.py @@ -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 IMRPhenomXPHM 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) @@ -343,7 +343,7 @@ def setUp(self): waveform_arguments=dict( reference_frequency=20.0, minimum_frequency=20.0, - waveform_approximant="IMRPhenomXPHM", + waveform_approximant="IMRPhenomPv2", ), ) @@ -361,7 +361,7 @@ def setUp(self): frequency_nodes_linear=fnodes_linear, frequency_nodes_quadratic=fnodes_quadratic, reference_frequency=20.0, - waveform_approximant="IMRPhenomXPHM", + waveform_approximant="IMRPhenomPv2", ), ) @@ -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 IMRPhenomXPHM 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 ) @@ -598,7 +598,7 @@ def test_rescaling(self): frequency_nodes_linear=fnodes_linear, frequency_nodes_quadratic=fnodes_quadratic, reference_frequency=20.0, - waveform_approximant="IMRPhenomXPHM", + waveform_approximant="IMRPhenomPv2", ), ) @@ -1006,7 +1006,7 @@ def test_from_npy(self, from_array): duration = 4 geocent_time = 1.2 reference_frequency = 20.0 - waveform_approximant = "IMRPhenomXPHM" + waveform_approximant = "IMRPhenomPv2" mc_range = [12.299703, 45] priors = bilby.gw.prior.BBHPriorDict() @@ -1153,7 +1153,7 @@ def create_likelihood_single_basis(self): duration = 4 geocent_time = 1.2 reference_frequency = 20.0 - waveform_approximant = "IMRPhenomXPHM" + waveform_approximant = "IMRPhenomPv2" mc_range = [12.299703, 45] priors = bilby.gw.prior.BBHPriorDict() From 94cc6dde061aaddbb17fd5818aa74c56d7f51bbc Mon Sep 17 00:00:00 2001 From: Ann-Kristin Malz <77342869+akjm99@users.noreply.github.com> Date: Tue, 16 Dec 2025 04:49:04 -0800 Subject: [PATCH 6/7] BUG: update waveforms to IMRPhenomPv2 for ROQ tests --- test/gw/source_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/gw/source_test.py b/test/gw/source_test.py index c9fc5b6c9..bf29d07e7 100644 --- a/test/gw/source_test.py +++ b/test/gw/source_test.py @@ -325,7 +325,7 @@ def setUp(self): frequency_nodes_linear=fnodes_linear, frequency_nodes_quadratic=fnodes_quadratic, reference_frequency=50.0, - waveform_approximant="IMRPhenomXPHM", + waveform_approximant="IMRPhenomPv2", ) self.frequency_array = bilby.core.utils.create_frequency_series(2048, 4) From 3b8272351b45c2b3b37320a99abbbd6563df598b Mon Sep 17 00:00:00 2001 From: Ann-Kristin Malz <77342869+akjm99@users.noreply.github.com> Date: Tue, 16 Dec 2025 07:45:06 -0800 Subject: [PATCH 7/7] BUG: update waveforms to IMRPhenomPv2 for ROQ tests --- test/gw/likelihood/marginalization_test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/gw/likelihood/marginalization_test.py b/test/gw/likelihood/marginalization_test.py index af085082e..d5b1d4004 100644 --- a/test/gw/likelihood/marginalization_test.py +++ b/test/gw/likelihood/marginalization_test.py @@ -216,7 +216,7 @@ def setUp(self): waveform_arguments=dict( reference_frequency=20.0, minimum_frequency=20.0, - waveform_approximant="IMRPhenomXPHM", + waveform_approximant="IMRPhenomPv2", ) ) self.interferometers.inject_signal( @@ -265,7 +265,7 @@ def setUp(self): waveform_arguments=dict( reference_frequency=20.0, minimum_frequency=20.0, - waveform_approximant="IMRPhenomXPHM", + waveform_approximant="IMRPhenomPv2", ) ) @@ -276,7 +276,7 @@ def setUp(self): start_time=1126259640, waveform_arguments=dict( reference_frequency=20.0, - waveform_approximant="IMRPhenomXPHM", + waveform_approximant="IMRPhenomPv2", ) )