67#include <lal/LALStdlib.h>
68#include <lal/LALInspiral.h>
69#include <lal/FindRoot.h>
71#include <lal/SeqFactories.h>
101 if (
params->nStartPad < 0)
105 if (
params->tSampling <= 0)
115 if (
params->totalMass <= 0.)
124 NULL, NULL,
params, ¶msInit);
145 if (output1->
data == NULL)
147 if (output2->
data == NULL)
151 if (
params->nStartPad < 0)
155 if (
params->tSampling <= 0)
165 if (
params->totalMass <= 0.)
176 NULL, NULL,
params, ¶msInit);
206 if (waveform == NULL)
208 if (waveform->
h != NULL)
210 if (waveform->
a != NULL)
212 if (waveform->
f != NULL)
214 if (waveform->
phi != NULL)
216 if (waveform->
shift != NULL)
221 sprintf(message,
"WARNING: Amp Order has been reset to %d",
params->ampOrder);
227 if (paramsInit.
nbins == 0)
246 memset(
a->data, 0, 2 * paramsInit.
nbins *
sizeof(
REAL4));
259 phi,
params, ¶msInit);
272 if ( fabs(phi->
data[count-1]/2.)/
LAL_PI < 2. ){
273 sprintf(message,
"The waveform has only %f cycles; we don't keep waveform with less than 2 cycles.",
274 (
double)(fabs(phi->
data[count-1]/2.)/
LAL_PI) );
280 phiC = phi->
data[count-1] ;
287 if ( waveform->
a == NULL )
292 if ( waveform->
f == NULL )
301 if ( waveform->
phi == NULL )
312 if (waveform->
a->
data == NULL)
315 if (waveform->
f->
data == NULL)
318 if (waveform->
phi->
data == NULL)
331 waveform->
psi = ppnParams->
psi;
339 ppnParams->
tc = (double)(count-1) /
params->tSampling ;
340 ppnParams->
length = count;
351 if ( waveform->
h == NULL )
356 if ( waveform->
h->
data == NULL )
394 REAL8 amp,
dt, fs, fu, fHigh, phase0, phase1, tC;
395 REAL8 phase, v, totalMass, fLso, freq, fOld;
396 INT4 i, startShift, count;
397 REAL8 xmin,xmax,xacc;
414 REAL8 apFac = 0, acFac = 0;
418 func = paramsInit->
func;
425 startShift =
params->nStartPad;
426 phase0 =
params->startPhase;
443 apFac *= 1.0 + cosI*cosI;
447 if (
params->totalMass <= 0)
469 funcParams = (
void *) &toffIn;
470 tC = func.
timing2(fs, funcParams);
477 v = pow(fs *
LAL_PI * totalMass, (1./3.));
490 fHigh = (fu < fLso) ? fu : fLso;
498 if (fHigh <= params->fLower)
510 funcParams = (
void *) &toffIn;
526 v = pow(freq*toffIn.
piM, (1./3.));
531 amp =
params->signalAmplitude*v*v;
535 output1->
data[
i]=(
REAL4)(amp*cos(phase+phase0));
537 output2->
data[
i]=(
REAL4)(amp*cos(phase+phase1));
547 f2a = pow (f2aFac * omega, 2./3.);
548 a->data[ice] = (
REAL4)(4.*apFac * f2a);
549 a->data[ico] = (
REAL4)(4.*acFac * f2a);
568 }
while (freq < fHigh && freq > fOld && toffIn.
t < -tC);
570 if (output1 && !(output2))
params->tC = toffIn.
t;
int XLALInspiralParameterCalc(InspiralTemplate *params)
REAL4 LALInspiralHCrossPolarization(REAL8 phase, REAL8 v, InspiralTemplate *params)
int XLALInspiralSetup(expnCoeffs *ak, InspiralTemplate *params)
int XLALInspiralInit(InspiralTemplate *params, InspiralInit *paramsInit)
int XLALInspiralChooseModel(expnFunc *func, expnCoeffs *ak, InspiralTemplate *params)
REAL4 LALInspiralHPlusPolarization(REAL8 phase, REAL8 v, InspiralTemplate *params)
int XLALInspiralWave2(REAL4Vector *output, InspiralTemplate *params)
int XLALInspiralWave2ForInjection(CoherentGW *waveform, InspiralTemplate *params, PPNParamStruc *ppnParams)
int XLALInspiralWave2Templates(REAL4Vector *output1, REAL4Vector *output2, InspiralTemplate *params)
static int XLALInspiralWave2Engine(REAL4Vector *output1, REAL4Vector *output2, REAL4Vector *h, REAL4Vector *a, REAL4Vector *ff, REAL8Vector *phi, InspiralTemplate *params, InspiralInit *paramsInit)
REAL4VectorSequence * XLALCreateREAL4VectorSequence(UINT4 length, UINT4 veclen)
REAL8 XLALDBisectionFindRoot(REAL8(*y)(REAL8, void *), REAL8 xmin, REAL8 xmax, REAL8 xacc, void *params)
#define GENERATEPPNINSPIRALH_EFSTOP
Reached requested termination frequency.
void * XLALMalloc(size_t n)
const LALUnit lalStrainUnit
const LALUnit lalHertzUnit
const LALUnit lalDimensionlessUnit
REAL4Vector * XLALCreateREAL4Vector(UINT4 length)
void XLALDestroyREAL4Vector(REAL4Vector *vector)
REAL8Vector * XLALCreateREAL8Vector(UINT4 length)
void XLALDestroyREAL8Vector(REAL8Vector *vector)
int int int XLALPrintInfo(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
int int XLALPrintWarning(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
#define XLAL_IS_REAL8_FAIL_NAN(val)
REAL4TimeVectorSeries * a
REAL4TimeVectorSeries * h
The inspiral waveform parameter structure containing information about the waveform to be generated.
This structure stores the parameters for constructing a restricted post-Newtonian waveform.
const CHAR * termDescription
The termination code description (above)
INT4 termCode
The termination condition (above) that stopped computation of the waveform.
REAL4 dfdt
The maximum value of encountered over any timestep used in generating the waveform.
REAL4 phi
The phase at coalescence (or arbitrary reference phase for a post -Newtonian approximation),...
REAL4 psi
polarization angle (radians)
REAL4 fStart
The actual starting frequency of the waveform, in Hz (normally close but not identical to fStartIn)
SkyPosition position
location of source on sky
UINT4 length
The length of the generated waveform.
REAL4 fStop
The frequency at the termination of the waveform, in Hz.
REAL8 tc
The time from the start of the waveform to coalescence (in the point-mass approximation),...
REAL4 fStartIn
The requested starting frequency of the waveform, in Hz.
REAL8 deltaT
The requested sampling interval of the waveform, in s.
REAL4VectorSequence * data
This structure contains various post-Newtonian and P-approximant expansion coefficients; the meanings...
Structure to hold the pointers to the generic functions defined above.
InspiralPhasing2 * phasing2
InspiralTiming2 * timing2
char output[FILENAME_MAX]