22 #include <gsl/gsl_const.h>
23 #include <gsl/gsl_errno.h>
24 #include <gsl/gsl_math.h>
25 #include <gsl/gsl_odeiv.h>
27 #include <lal/LALSimInspiral.h>
28 #include <lal/LALConstants.h>
29 #include <lal/LALStdlib.h>
30 #include <lal/TimeSeries.h>
31 #include <lal/Units.h>
38 #define UNUSED __attribute__ ((unused))
50 tagexpnCoeffsTaylorT4 {
56 REAL8 aatN,aat2,aat3,aat4,aat5,aat6,aat6l,aat7,
aat10,aat12;
143 REAL8 v2,v3,v9,v10,v12;
169 REAL8 v2,v3,v4,v9,v10,v12;
197 REAL8 v2,v3,v4,v5,v9,v10,v12;
227 REAL8 v2,v3,v4,v5,v6,v9,v10,v12;
259 REAL8 v2,v3,v4,v5,v6,v7,v9,v10,v12;
299 ydot[0] =
p->func(
y[0],&
p->ak);
300 ydot[1] =
y[0]*
y[0]*
y[0]*
p->ak.av;
328 ak->
m = ak->
m1 + ak->
m2;
329 ak->
mu = m1 * m2 / ak->
m;
330 ak->
nu = ak->
mu/ak->
m;
364 #if __GNUC__ >= 7 && !defined __INTEL_COMPILER
370 #if __GNUC__ >= 7 && !defined __INTEL_COMPILER
376 XLALPrintError(
"XLAL Error - %s: Invalid tidal PN order %d\nSee LALSimInspiralTidalOrder enum in LALSimInspiralWaveformFlags.h for valid tidal orders.\n",
389 XLALPrintError(
"XLAL Error - %s: PN approximant not supported for PN order %d\n", __func__,O);
418 XLALPrintError(
"XLAL Error - %s: PN approximant not supported for PN order %d\n", __func__,O);
422 XLALPrintError(
"XLAL Error - %s: Unknown PN order in switch\n", __func__);
466 const UINT4 blocklen = 1024;
467 const REAL8 visco = 1./sqrt(6.);
482 UINT4 j, len, idxRef = 0;
486 const gsl_odeiv_step_type *T = gsl_odeiv_step_rk4;
488 gsl_odeiv_system sys;
503 y[1] = (*phi)->data->data[0] = 0.;
509 s = gsl_odeiv_step_alloc(T, 2);
512 gsl_odeiv_step_apply(
s, j*
deltaT,
deltaT,
y, yerr, NULL, NULL, &sys);
514 if (
y[0] > visco ) {
515 XLALPrintInfo(
"XLAL Info - %s: PN inspiral terminated at ISCO\n", __func__);
518 if ( j >= (*v)->data->length ) {
524 (*v)->data->data[j] =
y[0];
525 (*phi)->data->data[j] =
y[1];
527 gsl_odeiv_step_free(
s);
540 len = (*phi)->data->length;
543 phiRef -= (*phi)->data->data[len-1];
545 else if( fRef ==
f_min )
546 phiRef -= (*phi)->data->data[0];
555 }
while ((*v)->data->data[j] <= VRef);
556 phiRef -= (*phi)->data->data[idxRef];
558 for (j = 0; j < len; ++j)
559 (*phi)->data->data[j] += phiRef;
561 return (
int)(*v)->data->length;
601 if( fRef != 0. && fRef <
f_min )
603 XLALPrintError(
"XLAL Error - %s: fRef = %f must be > fStart = %f\n",
604 __func__, fRef,
f_min);
609 XLALPrintError(
"XLAL Error - %s: fRef = %f must be < Schwar. ISCO=%f\n",
610 __func__, fRef, fISCO);
620 m1, m2,
f_min, fRef, lambda1, lambda2, tideO, phaseO);
624 v0, m1, m2,
r,
i, amplitudeO);
663 if( fRef != 0. && fRef <
f_min )
665 XLALPrintError(
"XLAL Error - %s: fRef = %f must be > fStart = %f\n",
666 __func__, fRef,
f_min);
671 XLALPrintError(
"XLAL Error - %s: fRef = %f must be < Schwar. ISCO=%f\n",
672 __func__, fRef, fISCO);
680 m1, m2,
f_min, fRef, lambda1, lambda2, tideO, phaseO);
685 for(
l=2;
l<=lmax;
l++){
686 for(
m=-
l;
m<=
l;
m++){
688 m1, m2,
r, amplitudeO,
l,
m);
733 if( fRef != 0. && fRef <
f_min )
735 XLALPrintError(
"XLAL Error - %s: fRef = %f must be > fStart = %f\n",
736 __func__, fRef,
f_min);
741 XLALPrintError(
"XLAL Error - %s: fRef = %f must be < Schwar. ISCO=%f\n",
742 __func__, fRef, fISCO);
750 m1, m2,
f_min, fRef, lambda1, lambda2, tideO, phaseO);
754 m1, m2,
r, amplitudeO,
l,
m);
788 deltaT, m1, m2,
f_min, fRef,
r,
i, lambda1, lambda2, tideO, O, O);
820 deltaT, m1, m2,
f_min, fRef,
r,
i, lambda1, lambda2, tideO, 0, O);
827 #include <lal/PrintFTSeries.h>
828 #include <lal/PrintFTSeries.h>
843 XLALSimInspiralTaylorT4PN(&hplus, &hcross, &tc, phic,
deltaT, m1, m2,
f_min, fRef,
r,
i, lambda1, lambda2, tideO, O);
void LALCheckMemoryLeaks(void)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_12PNTidalCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNEnergy_4PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_7PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_4PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNEnergy_10PNTidalCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralPNEnergy_2PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_0PNCoeff(REAL8 eta)
Computes the PN Coefficients for using in the TaylorT4 frequency equation.
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_2PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_6PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNEnergy_0PNCoeff(REAL8 eta)
Computes the PN Coefficients for using in the PN energy equation.
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_10PNTidalCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_6PNLogCoeff(REAL8 UNUSED eta)
static REAL8 UNUSED XLALSimInspiralPNEnergy_12PNTidalCoeff(REAL8 mByM)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_5PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralPNEnergy_6PNCoeff(REAL8 eta)
static REAL8 UNUSED XLALSimInspiralTaylorT4wdot_3PNCoeff(REAL8 UNUSED eta)
static int XLALSimInspiralTaylorT4Setup(expnCoeffsTaylorT4 *ak, expnFuncTaylorT4 *f, expnCoeffsdEnergyFlux *akdEF, REAL8 m1, REAL8 m2, REAL8 lambda1, REAL8 lambda2, LALSimInspiralTidalOrder tideO, int O)
static REAL8 XLALSimInspiralAngularAcceleration4_2PN(REAL8 v, expnCoeffsTaylorT4 *ak)
static REAL8 XLALSimInspiralAngularAcceleration4_3PN(REAL8 v, expnCoeffsTaylorT4 *ak)
static REAL8 XLALSimInspiralAngularAcceleration4_7PN(REAL8 v, expnCoeffsTaylorT4 *ak)
REAL8() SimInspiralEnergy4(REAL8 v, expnCoeffsdEnergyFlux *ak)
static REAL8 XLALSimInspiralAngularAcceleration4_4PN(REAL8 v, expnCoeffsTaylorT4 *ak)
static REAL8 XLALSimInspiralAngularAcceleration4_0PN(REAL8 v, expnCoeffsTaylorT4 *ak)
REAL8() SimInspiralAngularAcceleration4(REAL8 v, expnCoeffsTaylorT4 *ak)
static int XLALSimInspiralTaylorT4PNEvolveOrbitIntegrand(double UNUSED t, const double y[], double ydot[], void *params)
This function is used in the call to the GSL integrator.
static REAL8 XLALSimInspiralAngularAcceleration4_5PN(REAL8 v, expnCoeffsTaylorT4 *ak)
static REAL8 XLALSimInspiralAngularAcceleration4_6PN(REAL8 v, expnCoeffsTaylorT4 *ak)
Module containing the energy and flux functions for waveform generation.
static REAL8 UNUSED XLALSimInspiralEt6(REAL8 v, expnCoeffsdEnergyFlux *ak)
static REAL8 UNUSED XLALSimInspiralEt0(REAL8 v, expnCoeffsdEnergyFlux *ak)
static REAL8 UNUSED XLALSimInspiralEt4(REAL8 v, expnCoeffsdEnergyFlux *ak)
static REAL8 UNUSED XLALSimInspiralEt2(REAL8 v, expnCoeffsdEnergyFlux *ak)
int main(int argc, char *argv[])
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 * XLALSimInspiralTaylorT4PNModes(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 TaylorT4 phasing.
int XLALSimInspiralTaylorT4PNEvolveOrbit(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)
Evolves a post-Newtonian orbit using the Taylor T4 method.
COMPLEX16TimeSeries * XLALSimInspiralTaylorT4PNMode(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 TaylorT4 phasing.
int XLALSimInspiralTaylorT4PNGenerator(REAL8TimeSeries **hplus, REAL8TimeSeries **hcross, REAL8 phiRef, UNUSED 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 XLALSimInspiralTaylorT4PN(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 XLALSimInspiralTaylorT4PNRestricted(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.
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.
void LALDPrintTimeSeries(REAL8TimeSeries *series, const CHAR *filename)
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_NULL(...)
int int int XLALPrintInfo(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
int XLALPrintError(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
static _LAL_INLINE_ int XLALIsREAL8FailNaN(REAL8 val)
LIGOTimeGPS * XLALGPSAdd(LIGOTimeGPS *epoch, REAL8 dt)
Structure to carry a collection of spherical harmonic modes in COMPLEX16 time series.
SimInspiralEnergy4 * energy4
SimInspiralAngularAcceleration4 * angacc4