-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpn.py
More file actions
282 lines (226 loc) · 7.47 KB
/
pn.py
File metadata and controls
282 lines (226 loc) · 7.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
import numpy as np
from .backend import BACKEND as B
PI = np.pi
def _zero_function(*args, **kwargs):
return 0
def taylor_f2_amplitude_0(eta, chi_1, chi_2, mass_ratio):
return 1
taylor_f2_amplitude_1 = _zero_function
def taylor_f2_amplitude_2(eta, chi_1, chi_2, mass_ratio):
return -323 / 224 + 451 * eta / 168
def taylor_f2_amplitude_3(eta, chi_1, chi_2, mass_ratio):
return chi_1 * (27 * mass_ratio / 16 - 11 * eta / 12 + 27 / 16) + chi_2 * (
-27 * mass_ratio / 16 - 11 * eta / 12 + 27 / 16
)
def taylor_f2_amplitude_4(eta, chi_1, chi_2, mass_ratio):
return (
chi_1 ** 2 * (-81 * mass_ratio / 64 + 81 * eta / 32 - 81 / 64)
+ chi_2 ** 2 * (81 * mass_ratio / 64 + 81 * eta / 32 - 81 / 64)
+ (105271 / 24192 * eta ** 2 - 1975055 / 338688 * eta - 27312085 / 8128512)
- 47 / 16 * eta * chi_1 * chi_2
)
def taylor_f2_amplitude_5(eta, chi_1, chi_2, mass_ratio):
return (
chi_1 ** 3 * (mass_ratio * (3 / 16 - 3 * eta / 16) - 9 * eta / 16 + 3 / 16)
+ chi_1
* (
mass_ratio * (287213 / 32256 - 2083 * eta / 8064)
- 2227 * eta ** 2 / 2016
- 15569 * eta / 1344
+ 287213 / 32256
)
+ chi_2 ** 3 * (mass_ratio * (3 * eta / 16 - 3 / 16) - 9 * eta / 16 + 3 / 16)
+ chi_2
* (
mass_ratio * (2083 * eta / 8064 - 287213 / 32256)
- 2227 * eta ** 2 / 2016
- 15569 * eta / 1344
+ 287213 / 32256
)
- 85 * PI / 64
+ 85 * PI * eta / 16
)
def taylor_f2_amplitude_6(eta, chi_1, chi_2, mass_ratio):
return (
chi_1 * (-17 * PI * mass_ratio / 12 + 5 * PI * eta / 3 - 17 * PI / 12)
+ chi_2 * (17 * PI * mass_ratio / 12 + 5 * PI * eta / 3 - 17 * PI / 12)
+ chi_1 * chi_2 * (-133249 * eta ** 2 / 8064 - 319321 * eta / 32256)
+ chi_1 ** 2
* (
mass_ratio * (-14139 * eta / 32256 - 49039 / 14336)
+ 163199 * eta ** 2 / 16128
+ 158633 * eta / 64512
- 49039 / 14336
)
+ chi_2 ** 2
* (
mass_ratio * (14139 * eta / 32256 + 49039 / 14336)
+ 163199 * eta ** 2 / 16128
+ 158633 * eta / 64512
- 49039 / 14336
)
- 177520268561 / 8583708672
+ (545384828789 / 5007163392 - 205 * PI ** 2 / 48) * eta
- 3248849057 * eta ** 2 / 178827264
+ 34473079 * eta ** 3 / 6386688
)
def taylor_f2_phase_0(args):
return 1
taylor_f2_phase_1 = _zero_function
def taylor_f2_phase_2(args):
return 55 * args.eta / 9 + 3715 / 756
def taylor_f2_phase_3(args):
phase = -16 * PI
for m_on_m, chi in zip([args.m1_on_m, args.m2_on_m], [args.chi_1, args.chi_2]):
phase += m_on_m * (25 + 38 / 3 * m_on_m) * chi
return phase
def taylor_f2_phase_4(args):
phase = 15293365 / 508032 + 27145 / 504 * args.eta + 3085 / 72 * args.eta ** 2
phase -= 395 / 4 * args.eta * args.chi_1 * args.chi_2
for m_on_m, chi, qm_def in zip(
[args.m1_on_m, args.m2_on_m],
[args.chi_1, args.chi_2],
[args.qm_def_1, args.qm_def_2],
):
phase -= (50 * qm_def + 5 / 8) * m_on_m ** 2 * chi ** 2
return phase
def taylor_f2_phase_5(args):
phase = 5 / 9 * (7729 / 84 - 13 * args.eta) * PI
for m_on_m, chi in zip([args.m1_on_m, args.m2_on_m], [args.chi_1, args.chi_2]):
phase -= (
chi
* m_on_m
* (
13915 / 84
- m_on_m * (1 - m_on_m) * 10 / 3
+ m_on_m * (12760 / 81 + m_on_m * (1 - m_on_m) * 170 / 9)
)
)
return phase
def taylor_f2_phase_6(args):
phase = (
11583231236531 / 4694215680
- 640 / 3 * PI ** 2
- 6848 / 21 * np.euler_gamma
+ args.eta * (-15737765635 / 3048192 + 2255 / 12 * PI ** 2)
+ args.eta ** 2 * 76055 / 1728
- args.eta ** 3 * 127825 / 1296
+ taylor_f2_phase_6l(args) * B.np.log(4)
)
phase += (32675 / 112 + 5575 / 18 * args.eta) * args.eta * args.chi_1 * args.chi_2
for m_on_m, chi, qm_def in zip(
[args.m1_on_m, args.m2_on_m],
[args.chi_1, args.chi_2],
[args.qm_def_1, args.qm_def_2],
):
phase += PI * m_on_m * (1490 / 3 + m_on_m * 260) * chi
phase += (
(47035 / 84 + 2935 / 6 * m_on_m - 120 * m_on_m ** 2)
* m_on_m ** 2
* qm_def
* chi ** 2
)
phase += (
(-410825 / 672 - 1085 / 12 * m_on_m + 1255 / 36 * m_on_m ** 2)
* m_on_m ** 2
* chi ** 2
)
return phase
def taylor_f2_phase_7(args):
phase = PI * (
77096675 / 254016 + 378515 / 1512 * args.eta - 74045 / 756 * args.eta ** 2
)
for m_on_m, chi in zip([args.m1_on_m, args.m2_on_m], [args.chi_1, args.chi_2]):
phase += (
chi
* m_on_m
* (
-170978035 / 48384
+ args.eta * 2876425 / 672
+ args.eta ** 2 * 4735 / 144
+ m_on_m
* (
-7189233785 / 1524096
+ args.eta * 458555 / 3024
- args.eta ** 2 * 5345 / 72
)
)
)
return phase
taylor_f2_phase_8 = _zero_function
taylor_f2_phase_9 = _zero_function
def taylor_f2_phase_10(args):
phase = 0
for lambda_, m_on_m in zip(
[args.lambda_1, args.lambda_2], [args.m1_on_m, args.m2_on_m]
):
phase += 24 * (-12 + 11 * m_on_m) * m_on_m ** 4 * lambda_
return phase
taylor_f2_phase_11 = _zero_function
def taylor_f2_phase_12(args):
phase = 0
for lambda_, m_on_m in zip(
[args.lambda_1, args.lambda_2], [args.m1_on_m, args.m2_on_m]
):
phase += (
(
-15895 / 28
+ 4595 / 28 * m_on_m
+ 5715 / 14 * m_on_m ** 2
- 325 / 7 * m_on_m ** 3
)
* m_on_m ** 4
* lambda_
)
return phase
def taylor_f2_phase_13(args):
phase = 0
for lambda_, m_on_m in zip(
[args.lambda_1, args.lambda_2], [args.m1_on_m, args.m2_on_m]
):
phase += 24 * (12 - 11 * m_on_m) * PI * m_on_m ** 4 * lambda_
return phase
def taylor_f2_phase_14(args):
phase = 0
for lambda_, m_on_m in zip(
[args.lambda_1, args.lambda_2], [args.m1_on_m, args.m2_on_m]
):
phase += (
-(m_on_m ** 4)
* lambda_
* 5
* (
193986935 / 571536
- 14415613 / 381024 * m_on_m
- 57859 / 378 * m_on_m**2
- 209495 / 1512 * m_on_m**3
+ 965 / 54 * m_on_m**4
- 4 * m_on_m**5
)
)
return phase
def taylor_f2_phase_15(args):
phase = 0
for lambda_, m_on_m in zip(
[args.lambda_1, args.lambda_2], [args.m1_on_m, args.m2_on_m]
):
phase += (
m_on_m ** 4
* 1
/ 28
* PI
* lambda_
* (27719 - 22415 * m_on_m + 7598 * m_on_m ** 2 - 10520 * m_on_m ** 3)
)
return phase
taylor_f2_phase_0l = _zero_function
taylor_f2_phase_1l = _zero_function
taylor_f2_phase_2l = _zero_function
taylor_f2_phase_3l = _zero_function
taylor_f2_phase_4l = _zero_function
def taylor_f2_phase_5l(args):
return taylor_f2_phase_5(args) * 3
def taylor_f2_phase_6l(args):
return -6848 / 21
taylor_f2_phase_7l = _zero_function
taylor_f2_phase_8l = _zero_function