18"""Test that the aligned-spin limit of SEOBNRv4PHM is the same as SEOBNRv4HM
19In particular we consider cases where the final spin is *negative* with respect to the inital
20 orbital angular momentum. """
24from scipy.interpolate
import InterpolatedUnivariateSpline
25import lalsimulation
as ls
33 """Generate SEOBNRv4HM modes"""
34 m1SI = lal.MSUN_SI * q * M / (1.0 + q)
35 m2SI = lal.MSUN_SI * M / (1.0 + q)
36 nqcCoeffsInput = lal.CreateREAL8Vector(10)
38 PAparams = lal.CreateDict()
39 lal.DictInsertUINT4Value(PAparams,
"PAFlag", 0)
41 TGRparams = lal.CreateDict()
42 lal.DictInsertREAL8Value(TGRparams,
"domega220", 0.)
43 lal.DictInsertREAL8Value(TGRparams,
"dtau220", 0.)
44 lal.DictInsertREAL8Value(TGRparams,
"domega210", 0.)
45 lal.DictInsertREAL8Value(TGRparams,
"dtau210", 0.)
46 lal.DictInsertREAL8Value(TGRparams,
"domega330", 0.)
47 lal.DictInsertREAL8Value(TGRparams,
"dtau330", 0.)
48 lal.DictInsertREAL8Value(TGRparams,
"domega440", 0.)
49 lal.DictInsertREAL8Value(TGRparams,
"dtau440", 0.)
50 lal.DictInsertREAL8Value(TGRparams,
"domega550", 0.)
51 lal.DictInsertREAL8Value(TGRparams,
"dtau550", 0.)
53 sphtseries, dyn, dynHI = ls.SimIMRSpinAlignedEOBModes(
81 modes = [(2, 2), (2, 1), (3, 3), (4, 4), (5, 5)]
83 hI[lm] = np.trim_zeros(
84 -1 * ls.SphHarmTimeSeriesGetMode(sphtseries, lm[0], lm[1]).data.data,
"b"
91 """Generate SEOBNRv4PHM modes"""
93 m1SI = lal.MSUN_SI * q * M / (1.0 + q)
94 m2SI = lal.MSUN_SI * M / (1.0 + q)
95 approx = ls.SEOBNRv4PHM
96 hlm = ls.SimInspiralChooseTDModes(0.,
114 modes = [(2, 2), (2, 1), (3, 3), (4, 4), (5, 5)]
116 hI[lm] = ls.SphHarmTimeSeriesGetMode(hlm, lm[0], lm[1]).data.data
121@pytest.mark.parametrize("q", [5.0, 10.0, 15.0, 20.0])
123 """ Test that the (2,2) mode frequency in the ringdown is within in 1Hz between v4HM and v4PHM.
124 In particular, consider cases where the final spin is negative
with respect to the initial
125 orbital angular momentum. Of course considers only aligned-spin cases
"""
128 chi1_x, chi1_y, chi1_z = 0.0, 0.0, -0.95
129 chi2_x, chi2_y, chi2_z = 0.0, 0.0, -0.95
132 distance = 500 * 1e6 * lal.PC_SI
139 [chi1_x, chi2_y, chi1_z],
140 [chi1_x, chi2_y, chi2_z],
148 q, m_total, chi1_z, chi2_z, f_start22 * 0.5, distance, deltaT
151 time = deltaT * np.arange(len(hlmA[(2, 2)]))
152 time2 = deltaT * np.arange(len(hlmP[(2, 2)]))
156 phaseA = np.unwrap(np.angle(hlmA[mode]))
157 phaseP = np.unwrap(np.angle(hlmP[mode]))
159 intrpA = InterpolatedUnivariateSpline(time, phaseA)
160 intrpP = InterpolatedUnivariateSpline(time2, phaseP)
162 omega_A = intrpA.derivative()
163 omega_P = intrpP.derivative()
166 amp = np.abs(hlmA[mode].data)
169 omega_A_rd = omega_A(time[am : am + 350])
170 omega_P_rd = omega_P(time[am : am + 350])
176 omega_A_rd, omega_P_rd, atol=1
177 ),
"The frequencies of the (2,2) mode don't agree between SEOBNRv4PHM and SEOBNRv4HM!"
182if __name__ ==
"__main__":
183 args = sys.argv[1:]
or [
"-v",
"-rs",
"--junit-xml=junit-SEOBNRv4PHM_vs_4HM_ringdown.xml"]
184 sys.exit(pytest.main(args=[__file__] + args))
def get_SEOBNRv4PHM_modes(q, M, chi1, chi2, f_start, distance, deltaT)
Generate SEOBNRv4PHM modes.
def get_SEOBNRv4HM_modes(q, M, chi1, chi2, f_start, distance, deltaT)
Generate SEOBNRv4HM modes.
def test_aligned_spin_limit_ringdown(q)
Test that the (2,2) mode frequency in the ringdown is within in 1Hz between v4HM and v4PHM.