69#include <lal/LALStdlib.h>
70#include <lal/LALInspiral.h>
71#include <lal/FindRoot.h>
73#include <lal/SeqFactories.h>
130 if (
params->nStartPad < 0)
134 if (
params->tSampling <= 0)
144 if (
params->totalMass <= 0.)
153 NULL, NULL, NULL,
params, ¶msInit);
166 freq = in->
func(tC, &(in->
ak));
169 f = freq - in->
ak.
f0;
193 if (output1->
data == NULL)
195 if (output2->
data == NULL)
199 if (
params->nStartPad < 0)
203 if (
params->tSampling <= 0)
213 if (
params->totalMass <= 0.)
224 NULL, NULL, NULL,
params, ¶msInit);
256 if (waveform == NULL)
258 if (waveform->
h != NULL)
260 if (waveform->
a != NULL)
262 if (waveform->
f != NULL)
264 if (waveform->
phi != NULL)
266 if (waveform->
shift != NULL)
270 sprintf(message,
"WARNING: Amp Order has been reset to %d",
params->ampOrder);
276 if (paramsInit.
nbins==0)
296 memset(
a->data, 0,
a->length *
sizeof(
REAL4));
324 if (phiv->
data[
i] != 0.0)
break;
352 phiC = phiv->
data[count-1] ;
359 if ( waveform->
a == NULL )
364 if ( waveform->
f == NULL )
373 if ( waveform->
phi == NULL )
384 if (waveform->
a->
data == NULL)
387 if (waveform->
f->
data == NULL)
390 if (waveform->
phi->
data == NULL)
403 waveform->
psi = ppnParams->
psi;
411 ppnParams->
tc = (double)(count-1) /
params->tSampling ;
412 ppnParams->
length = count;
423 if ( waveform->
h == NULL )
428 if ( waveform->
h->
data == NULL )
463 INT4 i, startShift, count;
464 REAL8 dt, fu, eta, tc, totalMass, t, td,
c1, phi0, phi1, phi;
465 REAL8 v, v2, f, fHigh, tmax, fOld, phase, omega;
466 REAL8 xmin,xmax,xacc;
473 REAL8 temp, tempMax=0, tempMin = 0;
478 REAL8 apFac = 0., acFac = 0.;
482 func = paramsInit->
func;
492 apFac *= 1.0 + cosI*cosI;
498 startShift =
params->nStartPad;
511 fHigh = (fu < ak.
flso) ? fu : ak.
flso;
526 if (fHigh <= params->fLower)
534 c1 = eta/(5.*totalMass);
552 pars = (
void*) &timeIn;
563 for (tc =
c1*
params->tC/1000.; tc < xmax; tc+=c1*params->tC/1000.){
567 if (temp > tempMax) {
571 if (temp < tempMin) {
578 if (tempMax > 0 && tempMin < 0){
591 XLALPrintError(
"Can't find good bracket for BisectionFindRoot\n");
617 while (f < fHigh && t < tmax && f > fOld)
627 v = pow(f*
LAL_PI*totalMass, (1./3.));
636 output1->
data[
i] = (
REAL4) (apFac * v2) * cos(phase+phi0);
641 output2->
data[
i] = (
REAL4) (apFac * v2) * cos(phase+phi1);
651 a->data[ice] = (
REAL4)(apFac * v2 );
652 a->data[ico] = (
REAL4)(acFac * v2 );
673 if (output1 && !output2)
params->tC = 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)
static int XLALInspiralWave3Engine(REAL4Vector *output1, REAL4Vector *output2, REAL4Vector *h, REAL4Vector *a, REAL4Vector *ff, REAL8Vector *phi, InspiralTemplate *params, InspiralInit *paramsInit)
static REAL8 XLALInspiralFrequency3Wrapper(REAL8 tC, void *pars)
int XLALInspiralWave3Templates(REAL4Vector *output1, REAL4Vector *output2, InspiralTemplate *params)
void LALInspiralWave3(LALStatus *status, REAL4Vector *output, InspiralTemplate *params)
int XLALInspiralWave3(REAL4Vector *output, InspiralTemplate *params)
int XLALInspiralWave3ForInjection(CoherentGW *waveform, InspiralTemplate *params, PPNParamStruc *ppnParams)
#define ATTATCHSTATUSPTR(statusptr)
#define DETATCHSTATUSPTR(statusptr)
#define INITSTATUS(statusptr)
#define RETURN(statusptr)
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)
#define XLAL_ERROR_REAL8(...)
int int int XLALPrintInfo(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
int XLALPrintError(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
#define XLAL_PRINT_DEPRECATION_WARNING(replacement)
#define XLAL_IS_REAL8_FAIL_NAN(val)
REAL8(* func)(REAL8 tC, expnCoeffs *ak)
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.
InspiralPhasing3 * phasing3
InspiralFrequency3 * frequency3
char output[FILENAME_MAX]