Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALSimulation 6.1.0.1-bb0d041
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
LALSimInspiralTaylorF2.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2007 Jolien Creighton, B.S. Sathyaprakash, Thomas Cokelaer
3 * Copyright (C) 2012 Leo Singer, Evan Ochsner, Les Wade, Alex Nitz
4 * Assembled from code found in:
5 * - LALInspiralStationaryPhaseApproximation2.c
6 * - LALInspiralChooseModel.c
7 * - LALInspiralSetup.c
8 * - LALSimInspiralTaylorF2ReducedSpin.c
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with with program; see the file COPYING. If not, write to the
22 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
23 * MA 02110-1301 USA
24 */
25
26#include <stdlib.h>
27#include <math.h>
28#include <lal/Date.h>
29#include <lal/FrequencySeries.h>
30#include <lal/LALConstants.h>
31#include <lal/Sequence.h>
32#include <lal/LALDatatypes.h>
33#include <lal/LALSimInspiralEOS.h>
34#include <lal/LALSimInspiral.h>
35#include <lal/Units.h>
36#include <lal/XLALError.h>
37#include <lal/AVFactories.h>
39
40#ifndef _OPENMP
41#define omp ignore
42#endif
43
44/**
45 * @addtogroup LALSimInspiralTaylorXX_c
46 * @{
47 *
48 * @review TaylorF2 routines reviewed by Frank Ohme, Andrew Lundgren, Alex Nitz,
49 * Alex Nielsen, Salvatore Vitale, Jocelyn Read, Sebastian Khan.
50 * The review concluded with git hash 6106138b2140ffb11bc38fc914e0a1de7082dc4d (Nov 2014)
51 * Additional tidal terms up to 7.5PN order reviewed by Ohme, Haney, Khan, Samajdar,
52 * Riemenschneider, Setyawati, Hinderer. Concluded with git hash
53 * f15615215a7e70488d32137a827d63192cbe3ef6 (February 2019).
54 *
55 * @note If not specified explicitly by the user, the default tidal order will be
56 * chosen as 7.0PN, based on the good performance found in
57 * https://arxiv.org/pdf/1804.02235.pdf (Fig. 10). However, the user is free to specify
58 * any tidal order up to 7.5PN passing the relevant flag through the LALDict.
59 *
60 * @name Routines for TaylorF2 Waveforms
61 * @sa
62 * Section IIIF of Alessandra Buonanno, Bala R Iyer, Evan
63 * Ochsner, Yi Pan, and B S Sathyaprakash, "Comparison of post-Newtonian
64 * templates for compact binary inspiral signals in gravitational-wave
65 * detectors", Phys. Rev. D 80, 084043 (2009), arXiv:0907.0700v1
66 *
67 * @{
68 */
69
70/** \brief Returns structure containing TaylorF2 phasing coefficients for given
71 * physical parameters.
72 */
74 PNPhasingSeries **pn, /**< phasing coefficients (output) */
75 const REAL8 m1, /**< mass of body 1 */
76 const REAL8 m2, /**< mass of body 2 */
77 const REAL8 chi1, /**< aligned spin parameter of body 1 */
78 const REAL8 chi2, /**< aligned spin parameter of body 2 */
79 LALDict *p /**< LAL dictionary containing accessory parameters */
80 )
81{
82 PNPhasingSeries *pfa;
83
86
87
88 pfa = (PNPhasingSeries *) LALMalloc(sizeof(PNPhasingSeries));
89
90 XLALSimInspiralPNPhasing_F2(pfa, m1, m2, chi1, chi2, chi1*chi1, chi2*chi2, chi1*chi2, p);
91
92 *pn = pfa;
93
94 return XLAL_SUCCESS;
95}
96
98 REAL8Vector **phasingvals, /**< phasing coefficients (output) */
99 REAL8Vector mass1, /**< Masses of heavier bodies */
100 REAL8Vector mass2, /**< Masses of lighter bodies */
101 REAL8Vector chi1, /**< Aligned spin of body 1 */
102 REAL8Vector chi2, /**< Aligned spin of body 2 */
103 REAL8Vector lambda1, /**< Tidal deformation of body 1 */
104 REAL8Vector lambda2, /**< Tidal deformation of body 2 */
105 REAL8Vector dquadmon1, /**< Self-spin deformation of body 1 */
106 REAL8Vector dquadmon2 /**< Self-spin deformation of body 2 */
107 )
108{
109 UINT4 pnmaxnum = PN_PHASING_SERIES_MAX_ORDER + 1;
110
111 *phasingvals = XLALCreateREAL8Vector(mass1.length * pnmaxnum * 3);
112 REAL8Vector* pv = *phasingvals;
113
114 #pragma omp parallel
115 {
116 LALDict *a=NULL;
118 PNPhasingSeries *curr_phasing=NULL;
119 UINT4 idx, jdx;
120 #pragma omp for
121 for (idx=0; idx < mass1.length; idx++)
122 {
127
129 (&curr_phasing, mass1.data[idx], mass2.data[idx], chi1.data[idx],
130 chi2.data[idx], a);
131 for (jdx=0; jdx < pnmaxnum; jdx++)
132 {
133 pv->data[jdx*mass1.length + idx] = curr_phasing->v[jdx];
134 pv->data[mass1.length*pnmaxnum + jdx*mass1.length + idx] =
135 curr_phasing->vlogv[jdx];
136 pv->data[mass1.length*pnmaxnum*2 + idx + jdx*mass1.length] =
137 curr_phasing->vlogvsq[jdx];
138 }
139 LALFree(curr_phasing);
140 curr_phasing=NULL;
141 }
143 }
144
145
146 return XLAL_SUCCESS;
147}
148
149
151 COMPLEX16FrequencySeries **htilde_out, /**< FD waveform */
152 const REAL8Sequence *freqs, /**< frequency points at which to evaluate the waveform (Hz) */
153 const REAL8 phi_ref, /**< reference orbital phase (rad) */
154 const REAL8 m1_SI, /**< mass of companion 1 (kg) */
155 const REAL8 m2_SI, /**< mass of companion 2 (kg) */
156 const REAL8 f_ref, /**< Reference GW frequency (Hz) - if 0 reference point is coalescence */
157 const REAL8 shft, /**< time shift to be applied to frequency-domain phase (sec)*/
158 const REAL8 r, /**< distance of source (m) */
159 LALDict *p, /**< Linked list containing the extra testing GR parameters >*/
160 PNPhasingSeries *pfaP /**< Phasing coefficients >**/
161 )
162{
163
164 if (!htilde_out) XLAL_ERROR(XLAL_EFAULT);
165 if (!freqs) XLAL_ERROR(XLAL_EFAULT);
166 /* external: SI; internal: solar masses */
167 const REAL8 m1 = m1_SI / LAL_MSUN_SI;
168 const REAL8 m2 = m2_SI / LAL_MSUN_SI;
169 const REAL8 m = m1 + m2;
170 const REAL8 m_sec = m * LAL_MTSUN_SI; /* total mass in seconds */
171 const REAL8 eta = m1 * m2 / (m * m);
172 const REAL8 piM = LAL_PI * m_sec;
173 REAL8 amp0;
174 size_t i;
175 COMPLEX16 *data = NULL;
176 LIGOTimeGPS tC = {0, 0};
177 INT4 iStart = 0;
178
179 COMPLEX16FrequencySeries *htilde = NULL;
180
181 if (*htilde_out) { //case when htilde_out has been allocated in XLALSimInspiralTaylorF2
182 htilde = *htilde_out;
183 iStart = htilde->data->length - freqs->length; //index shift to fill pre-allocated data
184 if(iStart < 0) XLAL_ERROR(XLAL_EFAULT);
185 }
186 else { //otherwise allocate memory here
187 htilde = XLALCreateCOMPLEX16FrequencySeries("htilde: FD waveform", &tC, freqs->data[0], 0., &lalStrainUnit, freqs->length);
188 if (!htilde) XLAL_ERROR(XLAL_EFUNC);
190 }
191
192 PNPhasingSeries pfa = *pfaP;
193
194 REAL8 pfaN = 0.; REAL8 pfa1 = 0.;
195 REAL8 pfa2 = 0.; REAL8 pfa3 = 0.; REAL8 pfa4 = 0.;
196 REAL8 pfa5 = 0.; REAL8 pfl5 = 0.;
197 REAL8 pfa6 = 0.; REAL8 pfl6 = 0.;
198 REAL8 pfa7 = 0.;
199
201 switch (phaseO)
202 {
203 case -1:
204 case 7:
205 pfa7 = pfa.v[7];
206#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
207 __attribute__ ((fallthrough));
208#endif
209 case 6:
210 pfa6 = pfa.v[6];
211 pfl6 = pfa.vlogv[6];
212#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
213 __attribute__ ((fallthrough));
214#endif
215 case 5:
216 pfa5 = pfa.v[5];
217 pfl5 = pfa.vlogv[5];
218#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
219 __attribute__ ((fallthrough));
220#endif
221 case 4:
222 pfa4 = pfa.v[4];
223#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
224 __attribute__ ((fallthrough));
225#endif
226 case 3:
227 pfa3 = pfa.v[3];
228#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
229 __attribute__ ((fallthrough));
230#endif
231 case 2:
232 pfa2 = pfa.v[2];
233#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
234 __attribute__ ((fallthrough));
235#endif
236 case 1:
237 pfa1 = pfa.v[1];
238#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
239 __attribute__ ((fallthrough));
240#endif
241 case 0:
242 pfaN = pfa.v[0];
243 break;
244 default:
245 XLAL_ERROR(XLAL_ETYPE, "Invalid phase PN order %d", phaseO);
246 }
247
248 /* Validate expansion order arguments.
249 * This must be done here instead of in the OpenMP parallel loop
250 * because when OpenMP parallelization is turned on, early exits
251 * from loops (via return or break statements) are not permitted.
252 */
253
254 /* Validate amplitude PN order. */
256 switch (amplitudeO)
257 {
258 case -1:
259 case 7:
260 case 6:
261 case 5:
262 case 4:
263 case 3:
264 case 2:
265 case 0:
266 break;
267 default:
268 XLAL_ERROR(XLAL_ETYPE, "Invalid amplitude PN order %d", amplitudeO);
269 }
270
271 /* Generate tidal terms separately.
272 * Enums specifying tidal order are in LALSimInspiralWaveformFlags.h
273 */
274 REAL8 pft10 = 0.;
275 REAL8 pft12 = 0.;
276 REAL8 pft13 = 0.;
277 REAL8 pft14 = 0.;
278 REAL8 pft15 = 0.;
280 {
282 pft15 = pfa.v[15];
283#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
284 __attribute__ ((fallthrough));
285#endif
287#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
288 __attribute__ ((fallthrough));
289#endif
291 pft14 = pfa.v[14];
292#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
293 __attribute__ ((fallthrough));
294#endif
296 pft13 = pfa.v[13];
297#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
298 __attribute__ ((fallthrough));
299#endif
301 pft12 = pfa.v[12];
302#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
303 __attribute__ ((fallthrough));
304#endif
306 pft10 = pfa.v[10];
307#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
308 __attribute__ ((fallthrough));
309#endif
311 break;
312 default:
314 }
315
316 /* The flux and energy coefficients below are used to compute SPA amplitude corrections */
317
318 /* flux coefficients */
319 const REAL8 FTaN = XLALSimInspiralPNFlux_0PNCoeff(eta);
320 const REAL8 FTa2 = XLALSimInspiralPNFlux_2PNCoeff(eta);
321 const REAL8 FTa3 = XLALSimInspiralPNFlux_3PNCoeff(eta);
322 const REAL8 FTa4 = XLALSimInspiralPNFlux_4PNCoeff(eta);
323 const REAL8 FTa5 = XLALSimInspiralPNFlux_5PNCoeff(eta);
325 const REAL8 FTa6 = XLALSimInspiralPNFlux_6PNCoeff(eta);
326 const REAL8 FTa7 = XLALSimInspiralPNFlux_7PNCoeff(eta);
327
328 /* energy coefficients */
329 const REAL8 dETaN = 2. * XLALSimInspiralPNEnergy_0PNCoeff(eta);
330 const REAL8 dETa1 = 2. * XLALSimInspiralPNEnergy_2PNCoeff(eta);
331 const REAL8 dETa2 = 3. * XLALSimInspiralPNEnergy_4PNCoeff(eta);
332 const REAL8 dETa3 = 4. * XLALSimInspiralPNEnergy_6PNCoeff(eta);
333
334
335 /* Perform some initial checks */
336 if (m1_SI <= 0) XLAL_ERROR(XLAL_EDOM);
337 if (m2_SI <= 0) XLAL_ERROR(XLAL_EDOM);
338 if (f_ref < 0) XLAL_ERROR(XLAL_EDOM);
339 if (r <= 0) XLAL_ERROR(XLAL_EDOM);
340
341 /* extrinsic parameters */
342 amp0 = -4. * m1 * m2 / r * LAL_MRSUN_SI * LAL_MTSUN_SI * sqrt(LAL_PI/12.L);
343
344 data = htilde->data->data;
345
346 /* Compute the SPA phase at the reference point
347 * N.B. f_ref == 0 means we define the reference time/phase at "coalescence"
348 * when the frequency approaches infinity. In that case,
349 * the integrals Eq. 3.15 of arXiv:0907.0700 vanish when evaluated at
350 * f_ref == infinity. If f_ref is finite, we must compute the SPA phase
351 * evaluated at f_ref, store it as ref_phasing and subtract it off.
352 */
353 REAL8 ref_phasing = 0.;
354 if( f_ref != 0. ) {
355 const REAL8 vref = cbrt(piM*f_ref);
356 const REAL8 logvref = log(vref);
357 const REAL8 v2ref = vref * vref;
358 const REAL8 v3ref = vref * v2ref;
359 const REAL8 v4ref = vref * v3ref;
360 const REAL8 v5ref = vref * v4ref;
361 const REAL8 v6ref = vref * v5ref;
362 const REAL8 v7ref = vref * v6ref;
363 const REAL8 v8ref = vref * v7ref;
364 const REAL8 v9ref = vref * v8ref;
365 const REAL8 v10ref = vref * v9ref;
366 const REAL8 v12ref = v2ref * v10ref;
367 const REAL8 v13ref = vref * v12ref;
368 const REAL8 v14ref = vref * v13ref;
369 const REAL8 v15ref = vref * v14ref;
370 ref_phasing += pfa7 * v7ref;
371 ref_phasing += (pfa6 + pfl6 * logvref) * v6ref;
372 ref_phasing += (pfa5 + pfl5 * logvref) * v5ref;
373 ref_phasing += pfa4 * v4ref;
374 ref_phasing += pfa3 * v3ref;
375 ref_phasing += pfa2 * v2ref;
376 ref_phasing += pfa1 * vref;
377 ref_phasing += pfaN;
378
379 /* Tidal terms in reference phasing */
380 ref_phasing += pft15 * v15ref;
381 ref_phasing += pft14 * v14ref;
382 ref_phasing += pft13 * v13ref;
383 ref_phasing += pft12 * v12ref;
384 ref_phasing += pft10 * v10ref;
385
386 ref_phasing /= v5ref;
387 } /* End of if(f_ref != 0) block */
388
389 #pragma omp parallel for
390 for (i = 0; i < freqs->length; i++) {
391 const REAL8 f = freqs->data[i];
392 const REAL8 v = cbrt(piM*f);
393 const REAL8 logv = log(v);
394 const REAL8 v2 = v * v;
395 const REAL8 v3 = v * v2;
396 const REAL8 v4 = v * v3;
397 const REAL8 v5 = v * v4;
398 const REAL8 v6 = v * v5;
399 const REAL8 v7 = v * v6;
400 const REAL8 v8 = v * v7;
401 const REAL8 v9 = v * v8;
402 const REAL8 v10 = v * v9;
403 const REAL8 v12 = v2 * v10;
404 const REAL8 v13 = v * v12;
405 const REAL8 v14 = v * v13;
406 const REAL8 v15 = v * v14;
407 REAL8 phasing = 0.;
408 REAL8 dEnergy = 0.;
409 REAL8 flux = 0.;
410 REAL8 amp;
411
412 phasing += pfa7 * v7;
413 phasing += (pfa6 + pfl6 * logv) * v6;
414 phasing += (pfa5 + pfl5 * logv) * v5;
415 phasing += pfa4 * v4;
416 phasing += pfa3 * v3;
417 phasing += pfa2 * v2;
418 phasing += pfa1 * v;
419 phasing += pfaN;
420
421 /* Tidal terms in phasing */
422 phasing += pft15 * v15;
423 phasing += pft14 * v14;
424 phasing += pft13 * v13;
425 phasing += pft12 * v12;
426 phasing += pft10 * v10;
427
428 /* WARNING! Amplitude orders beyond 0 have NOT been reviewed!
429 * Use at your own risk. The default is to turn them off.
430 * These do not currently include spin corrections.
431 * Note that these are not higher PN corrections to the amplitude.
432 * They are the corrections to the leading-order amplitude arising
433 * from the stationary phase approximation. See for instance
434 * Eq 6.9 of arXiv:0810.5336
435 */
436 switch (amplitudeO)
437 {
438 case 7:
439 flux += FTa7 * v7;
440#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
441 __attribute__ ((fallthrough));
442#endif
443 case 6:
444 flux += (FTa6 + FTl6*logv) * v6;
445 dEnergy += dETa3 * v6;
446#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
447 __attribute__ ((fallthrough));
448#endif
449 case 5:
450 flux += FTa5 * v5;
451#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
452 __attribute__ ((fallthrough));
453#endif
454 case 4:
455 flux += FTa4 * v4;
456 dEnergy += dETa2 * v4;
457#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
458 __attribute__ ((fallthrough));
459#endif
460 case 3:
461 flux += FTa3 * v3;
462#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
463 __attribute__ ((fallthrough));
464#endif
465 case 2:
466 flux += FTa2 * v2;
467 dEnergy += dETa1 * v2;
468#if __GNUC__ >= 7 && !defined __INTEL_COMPILER
469 __attribute__ ((fallthrough));
470#endif
471 case -1: /* Default to no SPA amplitude corrections */
472 case 0:
473 flux += 1.;
474 dEnergy += 1.;
475 }
476
477 phasing /= v5;
478 flux *= FTaN * v10;
479 dEnergy *= dETaN * v;
480 // Note the factor of 2 b/c phi_ref is orbital phase
481 phasing += shft * f - 2.*phi_ref - ref_phasing;
482 amp = amp0 * sqrt(-dEnergy/flux) * v;
483 data[i+iStart] = amp * cos(phasing - LAL_PI_4)
484 - amp * sin(phasing - LAL_PI_4) * 1.0j;
485 }
486
487 *htilde_out = htilde;
488 return XLAL_SUCCESS;
489}
490
491/**
492 * Computes the stationary phase approximation to the Fourier transform of
493 * a chirp waveform. The amplitude is given by expanding \f$1/\sqrt{\dot{F}}\f$.
494 * If the PN order is set to -1, then the highest implemented order is used.
495 *
496 * @note f_ref is the GW frequency at which phi_ref is defined. The most common
497 * choice in the literature is to choose the reference point as "coalescence",
498 * when the frequency becomes infinite. This is the behavior of the code when
499 * f_ref==0. If f_ref > 0, phi_ref sets the orbital phase at that GW frequency.
500 *
501 * See arXiv:0810.5336 and arXiv:astro-ph/0504538 for spin corrections
502 * to the phasing.
503 * See arXiv:1303.7412 for spin-orbit phasing corrections at 3 and 3.5PN order
504 *
505 * The spin and tidal order enums are defined in LALSimInspiralWaveformFlags.h
506 */
508 COMPLEX16FrequencySeries **htilde_out, /**< FD waveform */
509 const REAL8 phi_ref, /**< reference orbital phase (rad) */
510 const REAL8 deltaF, /**< frequency resolution */
511 const REAL8 m1_SI, /**< mass of companion 1 (kg) */
512 const REAL8 m2_SI, /**< mass of companion 2 (kg) */
513 const REAL8 S1z, /**< z component of the spin of companion 1 */
514 const REAL8 S2z, /**< z component of the spin of companion 2 */
515 const REAL8 fStart, /**< start GW frequency (Hz) */
516 const REAL8 fEnd, /**< highest GW frequency (Hz) of waveform generation - if 0, end at Schwarzschild ISCO */
517 const REAL8 f_ref, /**< Reference GW frequency (Hz) - if 0 reference point is coalescence */
518 const REAL8 r, /**< distance of source (m) */
519 LALDict *p /**< Linked list containing the extra testing GR parameters >**/
520 )
521{
522 /* external: SI; internal: solar masses */
523 const REAL8 m1 = m1_SI / LAL_MSUN_SI;
524 const REAL8 m2 = m2_SI / LAL_MSUN_SI;
525 const REAL8 m = m1 + m2;
526 const REAL8 m_sec = m * LAL_MTSUN_SI; /* total mass in seconds */
527 // const REAL8 eta = m1 * m2 / (m * m);
528 const REAL8 piM = LAL_PI * m_sec;
529 const REAL8 vISCO = 1. / sqrt(6.);
530 const REAL8 fISCO = vISCO * vISCO * vISCO / piM;
531 //const REAL8 m1OverM = m1 / m;
532 // const REAL8 m2OverM = m2 / m;
533 REAL8 shft, f_max;
534 size_t i, n;
535 INT4 iStart;
536 REAL8Sequence *freqs = NULL;
537 LIGOTimeGPS tC = {0, 0};
538 int ret;
539 int retcode;
540 REAL8 fCONT;
545 XLAL_CHECK(retcode == XLAL_SUCCESS, XLAL_EFUNC, "Failed to set quadparams from Universal relation.\n");
546
547 COMPLEX16FrequencySeries *htilde = NULL;
548
549 /* Perform some initial checks */
550 if (!htilde_out) XLAL_ERROR(XLAL_EFAULT);
551 if (*htilde_out) XLAL_ERROR(XLAL_EFAULT);
552 if (m1_SI <= 0) XLAL_ERROR(XLAL_EDOM);
553 if (m2_SI <= 0) XLAL_ERROR(XLAL_EDOM);
554 if (fStart <= 0) XLAL_ERROR(XLAL_EDOM);
555 if (f_ref < 0) XLAL_ERROR(XLAL_EDOM);
556 if (r <= 0) XLAL_ERROR(XLAL_EDOM);
557
558 /* allocate htilde */
559 if (( fEnd == 0. ) && ( tideO == 0 )) // End at ISCO
560 f_max = fISCO;
561 else if (( fEnd == 0. ) && ( tideO != 0 )) { // End at the minimum of the contact and ISCO frequencies only when tides are enabled
562 fCONT = XLALSimInspiralContactFrequency(m1, lambda1, m2, lambda2); /* Contact frequency of two compact objects */
563 f_max = (fCONT > fISCO) ? fISCO : fCONT;
564 }
565 else // End at user-specified freq.
566 f_max = fEnd;
567 if (f_max <= fStart) XLAL_ERROR(XLAL_EDOM);
568
569 n = (size_t) (f_max / deltaF + 1);
570 XLALGPSAdd(&tC, -1 / deltaF); /* coalesce at t=0 */
571 htilde = XLALCreateCOMPLEX16FrequencySeries("htilde: FD waveform", &tC, 0.0, deltaF, &lalStrainUnit, n);
572 if (!htilde) XLAL_ERROR(XLAL_EFUNC);
573 memset(htilde->data->data, 0, n * sizeof(COMPLEX16));
575
576 /* Fill with non-zero vals from fStart to f_max */
577 iStart = (INT4) ceil(fStart / deltaF);
578
579 /* Sequence of frequencies where waveform model is to be evaluated */
580 freqs = XLALCreateREAL8Sequence(n - iStart);
581
582 /* extrinsic parameters */
583 shft = LAL_TWOPI * (tC.gpsSeconds + 1e-9 * tC.gpsNanoSeconds);
584
585 #pragma omp parallel for
586 for (i = iStart; i < n; i++) {
587 freqs->data[i-iStart] = i * deltaF;
588 }
589
590 /* phasing coefficients */
591 PNPhasingSeries pfa;
592 XLALSimInspiralPNPhasing_F2(&pfa, m1, m2, S1z, S2z, S1z*S1z, S2z*S2z, S1z*S2z, p);
593
594 ret = XLALSimInspiralTaylorF2Core(&htilde, freqs, phi_ref, m1_SI, m2_SI,
595 f_ref, shft, r, p, &pfa);
596
598
599 *htilde_out = htilde;
600
601 return ret;
602}
604
605/** @} */
606/** @} */
void XLALDestroyDict(LALDict *dict)
LALDict * XLALCreateDict(void)
#define LALMalloc(n)
#define LALFree(p)
int XLALSimInspiralSetQuadMonParamsFromLambdas(LALDict *LALparams)
if you do NOT provide a quadparam[1,2] term and you DO provide lamdba[1,2] then we calculate quad-mon...
REAL8 XLALSimInspiralContactFrequency(REAL8 m1_intr, REAL8 barlambda1, REAL8 m2_intr, REAL8 barlambda2)
This function estimates the radius for a binary of given masses and tidal deformability parameters.
static REAL8 UNUSED XLALSimInspiralPNFlux_5PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNEnergy_4PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_0PNCoeff(REAL8 eta)
Computes the flux PN Coefficients.
static REAL8 UNUSED XLALSimInspiralPNFlux_3PNCoeff(REAL8 UNUSED eta)
static REAL8 UNUSED XLALSimInspiralPNEnergy_2PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_4PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNEnergy_0PNCoeff(REAL8 eta)
Computes the PN Coefficients for using in the PN energy equation.
static REAL8 UNUSED XLALSimInspiralPNFlux_2PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_7PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_6PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNFlux_6PNLogCoeff(REAL8 UNUSED eta)
static void UNUSED XLALSimInspiralPNPhasing_F2(PNPhasingSeries *pfa, const REAL8 m1, const REAL8 m2, const REAL8 chi1L, const REAL8 chi2L, const REAL8 chi1sq, const REAL8 chi2sq, const REAL8 chi1dotchi2, LALDict *p)
static REAL8 UNUSED XLALSimInspiralPNEnergy_6PNCoeff(REAL8 eta)
Module to compute the eccentric TaylorF2 inspiral waveform for small eccentricity....
int XLALSimInspiralWaveformParamsInsertTidalLambda1(LALDict *params, REAL8 value)
REAL8 XLALSimInspiralWaveformParamsLookupTidalLambda2(LALDict *params)
REAL8 XLALSimInspiralWaveformParamsLookupTidalLambda1(LALDict *params)
INT4 XLALSimInspiralWaveformParamsLookupPNPhaseOrder(LALDict *params)
INT4 XLALSimInspiralWaveformParamsLookupPNAmplitudeOrder(LALDict *params)
int XLALSimInspiralWaveformParamsInsertTidalLambda2(LALDict *params, REAL8 value)
INT4 XLALSimInspiralWaveformParamsLookupPNTidalOrder(LALDict *params)
int XLALSimInspiralWaveformParamsInsertdQuadMon2(LALDict *params, REAL8 value)
int XLALSimInspiralWaveformParamsInsertdQuadMon1(LALDict *params, REAL8 value)
double i
Definition: bh_ringdown.c:118
double e
Definition: bh_ringdown.c:117
const double pn
sigmaKerr data[0]
#define __attribute__(x)
COMPLEX16FrequencySeries * XLALCreateCOMPLEX16FrequencySeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaF, const LALUnit *sampleUnits, size_t length)
#define LAL_MSUN_SI
#define LAL_PI
#define LAL_TWOPI
#define LAL_MTSUN_SI
#define LAL_PI_4
#define LAL_MRSUN_SI
double complex COMPLEX16
double REAL8
uint32_t UINT4
int32_t INT4
#define LAL_SIM_INSPIRAL_TIDAL_ORDER_DEFAULT
#define PN_PHASING_SERIES_MAX_ORDER
Structure for passing around PN phasing coefficients.
@ LAL_SIM_INSPIRAL_TIDAL_ORDER_5PN
@ LAL_SIM_INSPIRAL_TIDAL_ORDER_6PN
@ LAL_SIM_INSPIRAL_TIDAL_ORDER_75PN
@ LAL_SIM_INSPIRAL_TIDAL_ORDER_7PN
@ LAL_SIM_INSPIRAL_TIDAL_ORDER_0PN
@ LAL_SIM_INSPIRAL_TIDAL_ORDER_65PN
int XLALSimInspiralTaylorF2Core(COMPLEX16FrequencySeries **htilde_out, const REAL8Sequence *freqs, const REAL8 phi_ref, const REAL8 m1_SI, const REAL8 m2_SI, const REAL8 f_ref, const REAL8 shft, const REAL8 r, LALDict *p, PNPhasingSeries *pfaP)
int XLALSimInspiralTaylorF2AlignedPhasingArray(REAL8Vector **phasingvals, REAL8Vector mass1, REAL8Vector mass2, REAL8Vector chi1, REAL8Vector chi2, REAL8Vector lambda1, REAL8Vector lambda2, REAL8Vector dquadmon1, REAL8Vector dquadmon2)
int XLALSimInspiralTaylorF2(COMPLEX16FrequencySeries **htilde_out, const REAL8 phi_ref, const REAL8 deltaF, const REAL8 m1_SI, const REAL8 m2_SI, const REAL8 S1z, const REAL8 S2z, const REAL8 fStart, const REAL8 fEnd, const REAL8 f_ref, const REAL8 r, LALDict *p)
Computes the stationary phase approximation to the Fourier transform of a chirp waveform.
int XLALSimInspiralTaylorF2AlignedPhasing(PNPhasingSeries **pn, const REAL8 m1, const REAL8 m2, const REAL8 chi1, const REAL8 chi2, LALDict *p)
Returns structure containing TaylorF2 phasing coefficients for given physical parameters.
static const INT4 r
static const INT4 m
static const INT4 a
void XLALDestroyREAL8Sequence(REAL8Sequence *sequence)
REAL8Sequence * XLALCreateREAL8Sequence(size_t length)
const LALUnit lalStrainUnit
const LALUnit lalSecondUnit
LALUnit * XLALUnitMultiply(LALUnit *output, const LALUnit *unit1, const LALUnit *unit2)
REAL8Vector * XLALCreateREAL8Vector(UINT4 length)
#define XLAL_ERROR(...)
#define XLAL_CHECK(assertion,...)
XLAL_SUCCESS
XLAL_EFAULT
XLAL_EFUNC
XLAL_EDOM
XLAL_ETYPE
XLAL_EINVAL
LIGOTimeGPS * XLALGPSAdd(LIGOTimeGPS *epoch, REAL8 dt)
p
COMPLEX16Sequence * data
COMPLEX16 * data
INT4 gpsNanoSeconds
REAL8 vlogv[PN_PHASING_SERIES_MAX_ORDER+1]
REAL8 vlogvsq[PN_PHASING_SERIES_MAX_ORDER+1]
REAL8 v[PN_PHASING_SERIES_MAX_ORDER+1]
REAL8 * data
double f_max
Definition: unicorn.c:23