69#include <lal/LALInspiral.h>
70#include <lal/LALStdlib.h>
72#include <lal/SeqFactories.h>
105 REAL8 psi, psiOld, Fplus, Fcross, Fp0, Fp1, Fc0, Fc1, magL, amp, amp0, phi, phiOld, Phi;
106 REAL8 v, t, tMax,
dt, f, fOld, fn, phase, phi0, MCube, Theta, etaBy5M, NCapDotL, NCapDotLByL;
109 REAL8Vector dummy, values, dvalues, newvalues, yt, dym, dyt;
130 dummy.
length = nDEDim * 6;
141 newvalues.
data = &dummy.
data[2*nDEDim];
168 magL = in->
eta * (acstPars.
M * acstPars.
M)/v;
206 while ((
INT4)count < in->nStartPad)
208 signalvec->
data[count] = 0.L;
215 etaBy5M = in->
eta/(5.L*acstPars.
M);
216 Theta = etaBy5M * (in->
tC - t);
237 NCapDotLByL = NCapDotL/magL;
253 while (f < fn && t < tMax && f>fOld)
257 signalvec->
data[count] = amp*cos(phase+phi0);
277 funcParams = (
void *) &acstPars;
281 rk4in.
dydx = &dvalues;
284 Theta = etaBy5M * (in->
tC - t);
298 for (j=0; j<nDEDim; j++) values.
data[j] = newvalues.
data[j];
303 NCapDotLByL = NCapDotL/magL;
314 while (count < signalvec->length)
316 signalvec->
data[count] = 0.L;
334 REAL8 NCapDotL, NCapDotZ, LCapDotZ, NCapDotLCrossZ;
337 NCapDotL = NCap[0]*L[0] + NCap[1]*L[1] + NCap[2]*L[2];
340 NCapDotLCrossZ = NCap[0]*L[1] - NCap[1]*L[0];
342 *psi = atan((LCapDotZ - NCapDotL*NCapDotZ)/NCapDotLCrossZ);
347 if (psiOld)
while (fabs(*psi-psiOld)>
LAL_PI_2) *psi = (psiOld > *psi) ? *psi+
LAL_PI : *psi-
LAL_PI;
362 REAL8 cosTwoPsi, sinTwoPsi;
365 cosTwoPsi = cos(2.L*psi);
366 sinTwoPsi = sin(2.L*psi);
368 *Fplus = Fp0 * cosTwoPsi + Fp1 * sinTwoPsi;
369 *Fcross = Fc0 * sinTwoPsi + Fc1 * cosTwoPsi;
382 *phi=atan(2.L*NCapDotLByL*Fcross/((1.L + NCapDotLByL*NCapDotLByL)*Fplus));
385 if (phiOld)
while (fabs(*phi-phiOld)>
LAL_PI_2) *phi = (phiOld>*phi) ? *phi+
LAL_PI : *phi-
LAL_PI;
400 NCapDotLSq = NCapDotL * NCapDotL;
401 *amp = amp0 * v*v * sqrt ( pow(1.L+NCapDotLSq,2.L) * Fplus*Fplus + 4.L*NCapDotLSq*Fcross*Fcross);
422 REAL8 v, magL, S1DotL, S2DotL;
423 REAL8 fourM1Plus, fourM2Plus, oneBy2Mcube, Lsq, dL0,
c2, v6;
424 REAL8 L[Dim], S1[Dim], S2[Dim], S1CrossL[Dim], S2CrossL[Dim], S1CrossS2[Dim];
437 for (
i=0;
i<Dim;
i++)
440 S1[
i]=values->
data[
i+Dim];
441 S2[
i]=values->
data[
i+2*Dim];
444 S1DotL = S2DotL = 0.L;
445 for (
i=0;
i<Dim;
i++)
449 S1DotL += S1[
i] * L[
i];
450 S2DotL += S2[
i] * L[
i];
451 S1CrossL[
i] = S1[j] * L[k] - S1[k] * L[j];
452 S2CrossL[
i] = S2[j] * L[k] - S2[k] * L[j];
453 S1CrossS2[
i] = S1[j] * S2[k] - S1[k] * S2[j];
476 dvalues->
data[
i] = ((fourM1Plus -
c2 * S2DotL) * S1CrossL[
i]
477 + (fourM2Plus -
c2 * S1DotL) * S2CrossL[
i] - dL0 * L[
i]*v) * v6;;
479 dvalues->
data[
p] = ((
c2 * S2DotL - fourM1Plus) * S1CrossL[
i] - oneBy2Mcube * S1CrossS2[
i]) * v6;
481 dvalues->
data[
q] = ((
c2 * S1DotL - fourM2Plus) * S2CrossL[
i] + oneBy2Mcube * S1CrossS2[
i]) * v6;
void XLALRungeKutta4Free(rk4GSLIntegrator *integrator)
void LALInspiralSetup(LALStatus *status, expnCoeffs *ak, InspiralTemplate *params)
void LALInspiralChooseModel(LALStatus *status, expnFunc *func, expnCoeffs *ak, InspiralTemplate *params)
void LALRungeKutta4(LALStatus *, REAL8Vector *, rk4GSLIntegrator *, void *)
rk4GSLIntegrator * XLALRungeKutta4Init(INT4 n, rk4In *input)
static void LALInspiralPolarisationPhase(REAL8 *phi, REAL8 phiOld, REAL8 NCapDotLByL, REAL8 Fplus, REAL8 Fcross)
void LALInspiralSpinModulatedWave(LALStatus *status, REAL4Vector *signalvec, InspiralTemplate *in)
static void LALInspiralBeamFactors(REAL8 *Fplus, REAL8 *Fcross, REAL8 Fp0, REAL8 Fp1, REAL8 Fc0, REAL8 Fc1, REAL8 psi)
static void LALInspiralModulatedAmplitude(REAL8 *amp, REAL8 v, REAL8 amp0, REAL8 NCapDotLByL, REAL8 Fplus, REAL8 Fcross)
static void LALInspiralPolarisationAngle(REAL8 *psi, REAL8 psiOld, REAL8 *NCap, REAL8 *L)
void LALACSTDerivatives(REAL8Vector *values, REAL8Vector *dvalues, void *funcParams)
#define ABORT(statusptr, code, mesg)
#define CHECKSTATUSPTR(statusptr)
#define ATTATCHSTATUSPTR(statusptr)
#define ASSERT(assertion, statusptr, code, mesg)
#define DETATCHSTATUSPTR(statusptr)
#define INITSTATUS(statusptr)
#define RETURN(statusptr)
#define LALINSPIRALH_EMEM
Memory allocation error.
#define LALINSPIRALH_ENULL
Arguments contained an unexpected null pointer.
#define LALINSPIRALH_ESIZE
Invalid input range.
#define XLAL_IS_REAL8_FAIL_NAN(val)
This structure is needed to solve the differential equation giving the evolution of the orbital angul...
REAL8 fourM1Plus
fourM1Plus: = (all masses expressed in seconds)
REAL8 v
parameter of 'integration': v=sqrt(M/r)
REAL8 thirtytwoBy5etc
thirtytwoBy5etc:=
REAL8 M
Total mass of the binary (in seconds)
REAL8 magS1
The constant spin magnitude of the primary.
REAL8 fourM2Plus
fourM2Plus: = (all masses expressed in seconds)
REAL8 NCap[3]
Source direction (unit vector) in detector coordinate system.
REAL8 magS2
The constant spin magnitude of the secondary.
REAL8 oneBy2Mcube
oneBy2Mcube: =
REAL8 threeBy2Mcube
threeBy2Mcube: =
The inspiral waveform parameter structure containing information about the waveform to be generated.
INT4 nStartPad
Number of leading elements in the signal generation to be set to zero (input) If template is requeste...
REAL8 eta
symmetric mass ratio (input/output)
REAL8 totalMass
total mass of the binary in solar mass (input/output)
REAL8 spin2[3]
Spin vector of the secondary.
REAL8 mass1
Mass of the primary in solar mass (input/output)
REAL8 distance
Distance to the binary in seconds.
REAL8 startPhase
starting phase of the waveform in radians (input)
REAL8 fCutoff
upper frequency cutoff in Hz to be used in generating the waveform; If the last stable orbit frequenc...
REAL8 sourcePhi
Azimuth angle in the direction to the source.
REAL8 orbitPhi0
Initial azimuth angle of the orbit.
REAL8 spin1[3]
Spin vector of the primary.
REAL8 tC
total chirp time seconds (output)
REAL8 mass2
Mass of the secondary in solar mass (mass1 need not be larger than mass2 (input/output)
REAL8 orbitTheta0
Initial co-latitute of the orbit.
REAL8 fLower
lower frequency cutoff of the detector in Hz (input)
REAL8 tSampling
Sampling rate in Hz (input)
REAL8 sourceTheta
Co-latitute in the direction to the source.
This structure contains various post-Newtonian and P-approximant expansion coefficients; the meanings...
Structure to hold the pointers to the generic functions defined above.
InspiralPhasing3 * phasing3
InspiralFrequency3 * frequency3
Structure containing steps and controls for the GSL Runge-Kutta solver.
Structure used as an input to Runge-Kutta solver.