23 import lalsimulation
as lalsim
25 np.set_printoptions(precision=17)
31 Pre-computed data for different waveform modes,
33 Used in the regression test of SEOBNRv4HM_PA
36 Dict: dictionary containing the modes
61 -1.3968438162982541e-01,
62 -1.5925495580678407e+02,
63 -3.3713850517954216e+02,
64 -5.4743335258722220e+02,
65 -8.7301946486216650e+02,
66 -8.7492212355961533e+02,
91 1.480096232806204837e+00,
92 -7.807974106262993530e+01,
93 -1.670249682972653318e+02,
94 -2.721793395565951528e+02,
95 -4.357288791143605522e+02,
96 -4.371762545684100587e+02,
107 0.051112501745226545,
108 0.056086457627118551,
109 0.063775902886042721,
110 0.078864332055436248,
111 0.576776486652450626,
112 0.567171822083015198,
121 -1.798624864004767732e+00,
122 -2.404733437441886679e+02,
123 -5.073014634939491430e+02,
124 -8.227491887980770571e+02,
125 -1.311305924173796029e+03,
126 -1.314246406233119387e+03
137 0.009473217127067403,
138 0.010721049156921609,
139 0.012722513984742818,
140 0.016880490682204544,
141 0.247871444279401887,
142 0.232676698120316383,
151 2.841897673213301445e+00,
152 -3.153905230860205506e+02,
153 -6.711604824120537387e+02,
154 -1.091755633222126562e+03,
155 -1.743000212109299355e+03,
156 -1.746856853681002576e+03,
167 0.001896205803077448,
168 0.002213789075042580,
169 0.002742629541378499,
170 0.003907280821832254,
171 0.113725569203534563,
172 0.108064932141790415,
181 1.193337715232760221e+00,
182 -3.965977315334420723e+02,
183 -8.413111302239032057e+02,
184 -1.367057364036911622e+03,
185 -2.182095223636347328e+03,
186 -2.187082823278491560e+03,
193 rtol_amp = {(2, 2): 1e-5, (2, 1): 1e-5, (3, 3): 1e-5, (4, 4): 1e-5, (5, 5): 1e-5}
194 rtol_phase = {(2, 2): 1e-5, (2, 1): 1e-5, (3, 3): 1e-5, (4, 4): 1e-5, (5, 5): 1e-5}
199 Test that the waveform modes of SEOBNRv4HM_PA have not changed.
200 This is done by comparing the modes directly at a set of pre-determined
201 time points that cover the inspiral, merger and RD.
207 chi1_x, chi1_y = 0.0, 0.0
208 chi2_x, chi2_y = 0.0, 0.0
211 chi1_z = -7.19166988e-01
212 chi2_z = 5.67932765e-01
213 modes = [(2, 2), (2, 1), (3, 3), (4, 4), (5, 5)]
216 indices = [0, 54291, 108582, 162873, 217164, 217214]
221 deltaT = 1.0 / 16384.0
222 approx = lalsim.SEOBNRv4HM_PA
224 lal_params = lal.CreateDict()
226 hlm = lalsim.SimInspiralChooseTDModes(
244 time_hI = lalsim.SphHarmTimeSeriesGetMode(hlm, 2, 2).deltaT * np.arange(
245 len(lalsim.SphHarmTimeSeriesGetMode(hlm, 2, 2).data.data)
250 hI[lm] = lalsim.SphHarmTimeSeriesGetMode(hlm, lm[0], lm[1]).data.data
257 amp = np.abs(hI[mode])[indices]
258 phase = np.unwrap(np.angle(hI[mode]))[indices]
259 amp_stored, phase_stored = data[mode]
262 np.testing.assert_allclose(amp, amp_stored, atol=0, rtol=rtol_amp[mode])
263 np.testing.assert_allclose(phase, phase_stored, atol=0, rtol=rtol_phase[mode])
266 if __name__ ==
"__main__":
267 args = sys.argv[1:]
or [
"-v",
"-rs",
"--junit-xml=junit-SEOBNRv4HMPA.xml"]
268 sys.exit(pytest.main(args=[__file__] + args))
def test_SEOBNRv4HMPA()
Test that the waveform modes of SEOBNRv4HM_PA have not changed.
def get_stored_data()
Pre-computed data for different waveform modes, in geometric units.