22 #include <lal/LALSimInspiral.h>
23 #include <lal/FindRoot.h>
24 #include <lal/LALConstants.h>
25 #include <lal/LALStdlib.h>
26 #include <lal/TimeSeries.h>
27 #include <lal/Units.h>
35 #define UNUSED __attribute__ ((unused))
41 tagexpnCoeffsTaylorT3 {
44 REAL8 ptaN, pta2, pta3, pta4, pta5, pta6, pta7, ptl6,
pta10, pta12;
46 REAL8 ftaN, fta2, fta3, fta4, fta5, fta6, fta7, ftl6,
fta10, fta12;
55 REAL8 f0, fn, t0, theta_lso, v0, vn, vf, vlso, flso, phiC;
89 freq = in->
func(tC, &(in->
ak));
113 theta = pow(td,-0.125);
116 frequency = theta3*ak->
ftaN;
134 theta = pow(td,-0.125);
136 theta3 = theta2*
theta;
137 theta10 = theta2*theta2*theta2*theta2*theta2;
138 theta12 = theta10*theta2;
140 frequency = theta3*ak->
ftaN * (1.
143 + ak->
fta12*theta12);
161 theta = pow(td,-0.125);
163 theta3 = theta2*
theta;
164 theta10 = theta3*theta3*theta3*
theta;
165 theta12 = theta10*theta2;
167 frequency = theta3*ak->
ftaN * (1.
171 + ak->
fta12*theta12);
183 REAL8 theta,theta2,theta3,theta4, theta10, theta12;
189 theta = pow(td,-0.125);
191 theta3 = theta2*
theta;
192 theta4 = theta3*
theta;
193 theta10 = theta4*theta4*theta2;
194 theta12 = theta10*theta2;
196 frequency = theta3*ak->
ftaN * (1.
201 + ak->
fta12*theta12);
213 REAL8 theta,theta2,theta3,theta4,theta5, theta10, theta12;
219 theta = pow(td,-0.125);
221 theta3 = theta2*
theta;
222 theta4 = theta3*
theta;
223 theta5 = theta4*
theta;
224 theta10 = theta5*theta5;
225 theta12 = theta10*theta2;
227 frequency = theta3*ak->
ftaN * (1.
233 + ak->
fta12*theta12);
245 REAL8 theta,theta2,theta3,theta4,theta5,theta6, theta10, theta12;
251 theta = pow(td,-0.125);
253 theta3 = theta2*
theta;
254 theta4 = theta3*
theta;
255 theta5 = theta4*
theta;
256 theta6 = theta5*
theta;
257 theta10 = theta6*theta4;
258 theta12 = theta10*theta2;
260 frequency = theta3*ak->
ftaN * (1.
267 + ak->
fta12*theta12);
279 REAL8 theta,theta2,theta3,theta4,theta5,theta6,theta7, theta10, theta12;
285 theta = pow(td,-0.125);
287 theta3 = theta2*
theta;
288 theta4 = theta3*
theta;
289 theta5 = theta4*
theta;
290 theta6 = theta5*
theta;
291 theta7 = theta6*
theta;
292 theta10 = theta7*theta3;
293 theta12 = theta10*theta2;
295 frequency = theta3*ak->
ftaN * (1.
303 + ak->
fta12*theta12);
321 theta5 = pow(td,-0.625);
322 phase = (ak->
ptaN/theta5);
340 theta = pow(td,-0.125);
342 theta5 = theta2*theta2*
theta;
343 theta10 = theta5*theta5;
344 theta12 = theta10*theta2;
346 phase = (ak->
ptaN/theta5) * (1.
349 + ak->
pta12*theta12);
361 REAL8 theta,theta2,theta3,theta5, theta10, theta12;
367 theta = pow(td,-0.125);
369 theta3 = theta2*
theta;
370 theta5 = theta2*theta3;
371 theta10 = theta5*theta5;
372 theta12 = theta10*theta2;
374 phase = (ak->
ptaN/theta5) * (1.
378 + ak->
pta12*theta12);
390 REAL8 theta,theta2,theta3,theta4,theta5, theta10, theta12;
396 theta = pow(td,-0.125);
398 theta3 = theta2*
theta;
399 theta4 = theta3*
theta;
400 theta5 = theta4*
theta;
401 theta10 = theta5*theta5;
402 theta12 = theta10*theta2;
404 phase = (ak->
ptaN/theta5) * (1.
409 + ak->
pta12*theta12);
421 REAL8 theta,theta2,theta3,theta4,theta5, theta10, theta12;
427 theta = pow(td,-0.125);
429 theta3 = theta2*
theta;
430 theta4 = theta3*
theta;
431 theta5 = theta4*
theta;
432 theta10 = theta5*theta5;
433 theta12 = theta10*theta2;
435 phase = (ak->
ptaN/theta5) * (1.
441 + ak->
pta12*theta12);
453 REAL8 theta,theta2,theta3,theta4,theta5,theta6, theta10, theta12;
459 theta = pow(td,-0.125);
461 theta3 = theta2*
theta;
462 theta4 = theta3*
theta;
463 theta5 = theta4*
theta;
464 theta6 = theta5*
theta;
465 theta10 = theta6*theta4;
466 theta12 = theta10*theta2;
468 phase = (ak->
ptaN/theta5) * (1.
475 + ak->
pta12*theta12);
487 REAL8 theta,theta2,theta3,theta4,theta5,theta6,theta7, theta10, theta12;
493 theta = pow(td,-0.125);
495 theta3 = theta2*
theta;
496 theta4 = theta3*
theta;
497 theta5 = theta4*
theta;
498 theta6 = theta5*
theta;
499 theta7 = theta6*
theta;
500 theta10 = theta7*theta3;
501 theta12 = theta10*theta2;
503 phase = (ak->
ptaN/theta5) * (1.
511 + ak->
pta12*theta12);
533 REAL8 tN, t2, t3 ,t4, t5, t6, t6l, t7, tC, t10, t12;
534 REAL8 v, v2, v3, v4, v5, v6, v7, v8, v10, v12;
537 REAL8 chi1 = m1/(m1+m2), chi2 = m2/(m1+m2);
572 #if __GNUC__ >= 7 && !defined __INTEL_COMPILER
578 #if __GNUC__ >= 7 && !defined __INTEL_COMPILER
584 XLALPrintError(
"XLAL Error - %s: Invalid tidal PN order %d\nSee LALSimInspiralTidalOrder enum in LALSimInspiralWaveformFlags.h for valid tidal orders.\n",
594 #if __GNUC__ >= 7 && !defined __INTEL_COMPILER
599 #if __GNUC__ >= 7 && !defined __INTEL_COMPILER
604 #if __GNUC__ >= 7 && !defined __INTEL_COMPILER
609 #if __GNUC__ >= 7 && !defined __INTEL_COMPILER
615 #if __GNUC__ >= 7 && !defined __INTEL_COMPILER
620 #if __GNUC__ >= 7 && !defined __INTEL_COMPILER
627 XLALPrintError(
"XLAL Error - %s: Not supported for requested PN order\n", __func__);
631 XLALPrintError(
"XLAL Error - %s: Unknown PN order in switch\n", __func__);
640 + (t6 + t6l*log(16*v2)) * v6
668 REAL8 eta, tn, chi1, chi2;
717 #if __GNUC__ >= 7 && !defined __INTEL_COMPILER
725 #if __GNUC__ >= 7 && !defined __INTEL_COMPILER
731 XLALPrintError(
"XLAL Error - %s: Invalid tidal PN order %d\nSee LALSimInspiralTidalOrder enum in LALSimInspiralWaveformFlags.h for valid tidal orders.\n",
744 XLALPrintError(
"XLAL Error - %s: PN approximant not supported for requested PN order\n", __func__);
773 XLALPrintError(
"XLAL Error - %s: PN approximant not supported for requested PN order\n", __func__);
777 XLALPrintError(
"XLAL Error - %s: Unknown PN order in switch\n", __func__);
818 const UINT4 blocklen = 1024;
819 const REAL8 visco = sqrt(1.0/6.0);
820 REAL8 m = m1 + m2, VRef = 0.;
823 REAL8 tmptC, tC,
c1, xmin, xmax, xacc, v, phase, fOld, t, td, temp, tempMin = 0, tempMax = 0;
825 UINT4 j, len, idxRef = 0;
845 lambda2, tideO,
f_min, O))
866 pars = (
void*) &timeIn;
876 for (tmptC =
c1*tC/1000.; tmptC < xmax; tmptC+=
c1*tC/1000.){
880 if (temp > tempMax) {
884 if (temp < tempMin) {
891 if (tempMax > 0 && tempMin < 0){
915 (*V)->data->data[0] = v;
916 (*phi)->data->data[0] = phase;
938 XLALPrintInfo(
"XLAL Info - %s: PN inspiral terminated at ISCO\n", __func__);
942 XLALPrintInfo(
"XLAL Info - %s: PN inspiral terminated when frequency stalled\n", __func__);
948 if ( j >= (*V)->data->length ) {
954 (*V)->data->data[j] = v;
955 (*phi)->data->data[j] = phase;
971 len = (*phi)->data->length;
974 phiRef -= (*phi)->data->data[len-1];
976 else if( fRef ==
f_min )
977 phiRef -= (*phi)->data->data[0];
986 }
while ((*V)->data->data[j] <= VRef);
987 phiRef -= (*phi)->data->data[idxRef];
989 for (j = 0; j < len; ++j)
990 (*phi)->data->data[j] += phiRef;
992 return (
int)(*V)->data->length;
1026 m1, m2,
f_min, fRef, lambda1, lambda2, tideO, phaseO);
1030 v0, m1, m2,
r,
i, amplitudeO);
1069 if( fRef != 0. && fRef <
f_min )
1071 XLALPrintError(
"XLAL Error - %s: fRef = %f must be > fStart = %f\n",
1072 __func__, fRef,
f_min);
1077 XLALPrintError(
"XLAL Error - %s: fRef = %f must be < Schwar. ISCO=%f\n",
1078 __func__, fRef, fISCO);
1086 m1, m2,
f_min, fRef, lambda1, lambda2, tideO, phaseO);
1091 for(
l=2;
l<=lmax;
l++){
1092 for(
m=-
l;
m<=
l;
m++){
1094 m1, m2,
r, amplitudeO,
l,
m);
1139 if( fRef != 0. && fRef <
f_min )
1141 XLALPrintError(
"XLAL Error - %s: fRef = %f must be > fStart = %f\n",
1142 __func__, fRef,
f_min);
1147 XLALPrintError(
"XLAL Error - %s: fRef = %f must be < Schwar. ISCO=%f\n",
1148 __func__, fRef, fISCO);
1156 m1, m2,
f_min, fRef, lambda1, lambda2, tideO, phaseO);
1160 m1, m2,
r, amplitudeO,
l,
m);
REAL8 XLALSimInspiralTaylorLength(REAL8 deltaT, REAL8 m1, REAL8 m2, REAL8 f_min, int O)
static REAL8 UNUSED XLALSimInspiralTaylorT2Timing_12PNTidalCoeff(REAL8 eta, REAL8 chi, REAL8 lambda)
static REAL8 UNUSED XLALSimInspiralTaylorT3Phasing_12PNTidalCoeff(REAL8 eta, REAL8 chi, REAL8 lambda)
static REAL8 UNUSED XLALSimInspiralTaylorT2Timing_6PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT3Frequency_4PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT3Phasing_4PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT3Frequency_12PNTidalCoeff(REAL8 eta, REAL8 chi, REAL8 lambda)
static REAL8 UNUSED XLALSimInspiralTaylorT3Frequency_3PNCoeff(REAL8 UNUSED eta)
static REAL8 UNUSED XLALSimInspiralTaylorT2Timing_2PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT3Phasing_3PNCoeff(REAL8 UNUSED eta)
static REAL8 UNUSED XLALSimInspiralTaylorT3Phasing_6PNLogCoeff(REAL8 UNUSED eta)
static REAL8 UNUSED XLALSimInspiralTaylorT3Frequency_7PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT2Timing_5PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT3Phasing_6PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT3Phasing_7PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT3Phasing_0PNCoeff(REAL8 eta)
Computes the PN Coefficients for using in the TaylorT3 phasing equation.
static REAL8 UNUSED XLALSimInspiralTaylorT2Timing_4PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT3Frequency_2PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT2Timing_3PNCoeff(REAL8 UNUSED eta)
static REAL8 UNUSED XLALSimInspiralTaylorT3Phasing_2PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT3Frequency_5PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT3Phasing_5PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT3Frequency_0PNCoeff(REAL8 totalmass)
Computes the PN Coefficients for using in the TaylorT3 frequency equation.
static REAL8 UNUSED XLALSimInspiralTaylorT2Timing_7PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT3Phasing_10PNTidalCoeff(REAL8 chi, REAL8 lambda)
static REAL8 UNUSED XLALSimInspiralTaylorT3Frequency_6PNLogCoeff(REAL8 UNUSED eta)
static REAL8 UNUSED XLALSimInspiralTaylorT2Timing_10PNTidalCoeff(REAL8 chi, REAL8 lambda)
static REAL8 UNUSED XLALSimInspiralTaylorT2Timing_0PNCoeff(REAL8 totalmass, REAL8 eta)
Computes the PN Coefficients for using in the TaylorT2 timing equation.
static REAL8 UNUSED XLALSimInspiralTaylorT3Frequency_6PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT3Frequency_10PNTidalCoeff(REAL8 chi, REAL8 lambda)
static REAL8 UNUSED XLALSimInspiralTaylorT2Timing_6PNLogCoeff(REAL8 UNUSED eta)
static REAL8 XLALSimInspiralFrequency3_0PN(REAL8 td, expnCoeffsTaylorT3 *ak)
static REAL8 XLALSimInspiralFrequency3_2PN(REAL8 td, expnCoeffsTaylorT3 *ak)
static int XLALSimInspiralTaylorT3Setup(expnCoeffsTaylorT3 *ak, expnFuncTaylorT3 *f, REAL8 deltaT, REAL8 m1, REAL8 m2, REAL8 lambda1, REAL8 lambda2, LALSimInspiralTidalOrder tideO, REAL8 f_min, int O)
static REAL8 XLALInspiralFrequency3Wrapper(REAL8 tC, void *pars)
static REAL8 XLALSimInspiralPhasing3_5PN(REAL8 td, expnCoeffsTaylorT3 *ak)
static REAL8 XLALSimInspiralPhasing3_4PN(REAL8 td, expnCoeffsTaylorT3 *ak)
static REAL8 XLALSimInspiralPhasing3_3PN(REAL8 td, expnCoeffsTaylorT3 *ak)
static REAL8 XLALSimInspiralFrequency3_5PN(REAL8 td, expnCoeffsTaylorT3 *ak)
static REAL8 XLALSimInspiralPhasing3_2PN(REAL8 td, expnCoeffsTaylorT3 *ak)
static REAL8 XLALSimInspiralFrequency3_3PN(REAL8 td, expnCoeffsTaylorT3 *ak)
REAL8() SimInspiralPhasing3(REAL8 td, expnCoeffsTaylorT3 *ak)
static REAL8 XLALSimInspiralFrequency3_4PN(REAL8 td, expnCoeffsTaylorT3 *ak)
static REAL8 XLALSimInspiralPhasing3_6PN(REAL8 td, expnCoeffsTaylorT3 *ak)
static REAL8 XLALSimInspiralPhasing3_0PN(REAL8 td, expnCoeffsTaylorT3 *ak)
static REAL8 XLALSimInspiralChirpLength(REAL8 m1, REAL8 m2, REAL8 lambda1, REAL8 lambda2, LALSimInspiralTidalOrder tideO, REAL8 f_min, int O)
static REAL8 XLALSimInspiralPhasing3_7PN(REAL8 td, expnCoeffsTaylorT3 *ak)
static REAL8 XLALSimInspiralFrequency3_7PN(REAL8 td, expnCoeffsTaylorT3 *ak)
REAL8() SimInspiralFrequency3(REAL8 td, expnCoeffsTaylorT3 *ak)
static REAL8 XLALSimInspiralFrequency3_6PN(REAL8 td, expnCoeffsTaylorT3 *ak)
Module containing the energy and flux functions for waveform generation.
REAL8 XLALDBisectionFindRoot(REAL8(*y)(REAL8, void *), REAL8 xmin, REAL8 xmax, REAL8 xacc, void *params)
int XLALSimInspiralPNPolarizationWaveforms(REAL8TimeSeries **hplus, REAL8TimeSeries **hcross, REAL8TimeSeries *V, REAL8TimeSeries *Phi, REAL8 v0, REAL8 m1, REAL8 m2, REAL8 r, REAL8 i, int ampO)
Given time series for a binary's orbital dynamical variables, construct the waveform polarizations h+...
LALSimInspiralTidalOrder
Enumeration of allowed PN orders of tidal effects.
@ LAL_SIM_INSPIRAL_TIDAL_ORDER_5PN
@ LAL_SIM_INSPIRAL_TIDAL_ORDER_6PN
@ LAL_SIM_INSPIRAL_TIDAL_ORDER_ALL
@ LAL_SIM_INSPIRAL_TIDAL_ORDER_0PN
COMPLEX16TimeSeries * XLALCreateSimInspiralPNModeCOMPLEX16TimeSeriesLALConvention(REAL8TimeSeries *v, REAL8TimeSeries *phi, REAL8 m1, REAL8 m2, REAL8 r, int O, int l, int m)
Computes h(l,m) mode timeseries of spherical harmonic decomposition of the post-Newtonian inspiral wa...
SphHarmTimeSeries * XLALSimInspiralTaylorT3PNModes(UNUSED REAL8 v0, REAL8 deltaT, REAL8 m1, REAL8 m2, REAL8 f_min, REAL8 fRef, REAL8 r, REAL8 lambda1, REAL8 lambda2, LALSimInspiralTidalOrder tideO, int amplitudeO, int phaseO, int lmax)
Driver routine to compute the -2 spin-weighted spherical harmonic modes using TaylorT3 phasing.
COMPLEX16TimeSeries * XLALSimInspiralTaylorT3PNMode(UNUSED REAL8 v0, REAL8 deltaT, REAL8 m1, REAL8 m2, REAL8 f_min, REAL8 fRef, REAL8 r, REAL8 lambda1, REAL8 lambda2, LALSimInspiralTidalOrder tideO, int amplitudeO, int phaseO, int l, int m)
Driver routine to compute the -2 spin-weighted spherical harmonic mode using TaylorT3 phasing.
int XLALSimInspiralTaylorT3PN(REAL8TimeSeries **hplus, REAL8TimeSeries **hcross, REAL8 phiRef, REAL8 deltaT, REAL8 m1, REAL8 m2, REAL8 f_min, REAL8 fRef, REAL8 r, REAL8 i, REAL8 lambda1, REAL8 lambda2, LALSimInspiralTidalOrder tideO, int O)
Driver routine to compute the post-Newtonian inspiral waveform.
int XLALSimInspiralTaylorT3PNGenerator(REAL8TimeSeries **hplus, REAL8TimeSeries **hcross, REAL8 phiRef, REAL8 v0, REAL8 deltaT, REAL8 m1, REAL8 m2, REAL8 f_min, REAL8 fRef, REAL8 r, REAL8 i, REAL8 lambda1, REAL8 lambda2, LALSimInspiralTidalOrder tideO, int amplitudeO, int phaseO)
Driver routine to compute the post-Newtonian inspiral waveform.
int XLALSimInspiralTaylorT3PNRestricted(REAL8TimeSeries **hplus, REAL8TimeSeries **hcross, REAL8 phiRef, REAL8 deltaT, REAL8 m1, REAL8 m2, REAL8 f_min, REAL8 fRef, REAL8 r, REAL8 i, REAL8 lambda1, REAL8 lambda2, LALSimInspiralTidalOrder tideO, int O)
Driver routine to compute the restricted post-Newtonian inspiral waveform.
int XLALSimInspiralTaylorT3PNEvolveOrbit(REAL8TimeSeries **V, REAL8TimeSeries **phi, REAL8 phiRef, REAL8 deltaT, REAL8 m1, REAL8 m2, REAL8 f_min, REAL8 fRef, REAL8 lambda1, REAL8 lambda2, LALSimInspiralTidalOrder tideO, int O)
Computes a post-Newtonian orbit using the Taylor T3 method.
SphHarmTimeSeries * XLALSphHarmTimeSeriesAddMode(SphHarmTimeSeries *appended, const COMPLEX16TimeSeries *inmode, UINT4 l, INT4 m)
Prepend a node to a linked list of SphHarmTimeSeries, or create a new head.
REAL8TimeSeries * XLALResizeREAL8TimeSeries(REAL8TimeSeries *series, int first, size_t length)
REAL8TimeSeries * XLALCreateREAL8TimeSeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaT, const LALUnit *sampleUnits, size_t length)
void XLALDestroyCOMPLEX16TimeSeries(COMPLEX16TimeSeries *series)
void XLALDestroyREAL8TimeSeries(REAL8TimeSeries *series)
const LALUnit lalDimensionlessUnit
#define XLAL_ERROR_REAL8(...)
#define XLAL_ERROR_NULL(...)
int int int XLALPrintInfo(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
int XLALPrintError(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
#define XLAL_IS_REAL8_FAIL_NAN(val)
LIGOTimeGPS * XLALGPSAdd(LIGOTimeGPS *epoch, REAL8 dt)
REAL8(* func)(REAL8 tC, expnCoeffsTaylorT3 *ak)
Structure to carry a collection of spherical harmonic modes in COMPLEX16 time series.
SimInspiralFrequency3 * frequency3
SimInspiralPhasing3 * phasing3