21#include <lal/LALInspiral.h>
22#include <lal/LALStdlib.h>
23#include <lal/LALStdio.h>
24#include <lal/GenerateInspiral.h>
25#include <lal/GeneratePPNInspiral.h>
26#include <lal/SeqFactories.h>
36 if (strstr(inString,
"fixedStep"))
49 if (strstr(inString,
"inspiralOnly"))
61 if (strstr(inString,
"NO")) {
63 }
else if (strstr(inString,
"SO15")) {
65 }
else if (strstr(inString,
"SS")) {
67 }
else if (strstr(inString,
"SELF")) {
69 }
else if (strstr(inString,
"QM")) {
71 }
else if (strstr(inString,
"SO25")) {
73 }
else if (strstr(inString,
"SO")) {
75 }
else if (strstr(inString,
"ALL_SPIN")) {
77 }
else if (strstr(inString,
"TIDAL5PN")) {
79 }
else if (strstr(inString,
"TIDAL")) {
81 }
else if (strstr(inString,
"ALL")){
84 XLALPrintError(
"Cannot parse LALInspiralInteraction from string: %s\n Please add 'ALL' to the above string for including all spin interactions\n", inString );
151 ppnParams->
ppn = NULL;
159 for (
i = 2;
i <= (
INT4)( order );
i++ )
175 inspiralParams.
order = order;
220 if ( waveform->
a == NULL && waveform->
h == NULL)
223 "No waveform generated (check lower frequency)\n");
233 "Waveform sampling interval is too large:\n"
234 "\tmaximum df*dt = %f", ppnParams->
dfdt );
241 "Injected waveform parameters:\n"
252 "ppnParams->position.system\t= %d\n"
285 if ( !ppnParams || !thisEvent )
289 ppnParams->mTot = thisEvent->mass1 + thisEvent->mass2;
290 ppnParams->eta = thisEvent->eta;
291 ppnParams->d = thisEvent->distance* 1.0e6 *
LAL_PC_SI;
292 ppnParams->inc = thisEvent->inclination;
293 ppnParams->phi = thisEvent->coa_phase;
294 ppnParams->ampOrder = thisEvent->amp_order;
297 if ( thisEvent->f_lower > 0 )
299 ppnParams->fStartIn = thisEvent->f_lower;
304 "f_lower must be specified in the injection file generation.\n" );
307 ppnParams->fStopIn = -1.0 /
311 ppnParams->position.longitude = thisEvent->longitude;
312 ppnParams->position.latitude = thisEvent->latitude;
314 ppnParams->psi = thisEvent->polarization;
315 ppnParams->epoch.gpsSeconds = 0;
316 ppnParams->epoch.gpsNanoSeconds = 0;
331 if ( !inspiralParams || !thisEvent || !ppnParams )
335 inspiralParams->mass1 = thisEvent->mass1;
336 inspiralParams->mass2 = thisEvent->mass2;
337 inspiralParams->fLower = ppnParams->fStartIn;
338 inspiralParams->fFinal = thisEvent->f_final;
339 inspiralParams->fCutoff = 1./ (ppnParams->deltaT)/2.-1;
340 inspiralParams->ampOrder = ppnParams->ampOrder;
343 inspiralParams->tSampling = 1./ (ppnParams->deltaT);
344 inspiralParams->signalAmplitude = 1.;
345 inspiralParams->distance = thisEvent->distance *
LAL_PC_SI * 1e6;
348 inspiralParams->startTime = 0.0;
349 inspiralParams->startPhase = thisEvent->coa_phase;
355 inspiralParams->alpha = -1.;
356 inspiralParams->psi0 = -1.;
357 inspiralParams->psi3 = -1.;
358 inspiralParams->alpha1 = -1.;
359 inspiralParams->alpha2 = -1.;
360 inspiralParams->beta = -1.;
364 if ( inspiralParams->approximant ==
SpinTaylor && thisEvent->inclination == 0 )
366 XLALPrintError(
"Inclination cannot be exactly zero for SpinTaylor approximant.\n");
369 inspiralParams->inclination = thisEvent->inclination;
371 inspiralParams->ieta = 1;
372 inspiralParams->nStartPad = 0;
375 inspiralParams->nEndPad = 16384;
377 inspiralParams->massChoice =
m1Andm2;
382 inspiralParams->spin1[0] = thisEvent->spin1x;
383 inspiralParams->spin2[0] = thisEvent->spin2x;
384 inspiralParams->spin1[1] = thisEvent->spin1y;
385 inspiralParams->spin2[1] = thisEvent->spin2y;
386 inspiralParams->spin1[2] = thisEvent->spin1z;
387 inspiralParams->spin2[2] = thisEvent->spin2z;
389 inspiralParams->orbitTheta0 = thisEvent->theta0;
390 inspiralParams->orbitPhi0 = thisEvent->phi0;
391 inspiralParams->qmParameter[0] = thisEvent->qmParameter1;
392 inspiralParams->qmParameter[1] = thisEvent->qmParameter2;
int XLALGetAdaptiveIntFromString(const CHAR *inString)
XLAL function to determine adaptive integration flag from a string.
int XLALGetInspiralOnlyFromString(const CHAR *inString)
XLAL function to determine inspiral-only flag from a string.
int XLALGenerateInspiralPopulateInspiral(InspiralTemplate *restrict inspiralParams, SimInspiralTable *restrict thisEvent, PPNParamStruc *restrict ppnParams)
int XLALGenerateInspiralPopulatePPN(PPNParamStruc *restrict ppnParams, SimInspiralTable *restrict thisEvent)
void LALInspiralWaveForInjection(LALStatus *status, CoherentGW *waveform, InspiralTemplate *params, PPNParamStruc *ppnParams)
int XLALGetOrderFromString(const char *waveform)
int XLALGetApproximantFromString(const char *waveform)
int XLALGetFrameAxisFromString(const char *waveform)
#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 GENERATEINSPIRAL_SOURCEPHI
#define GENERATEINSPIRAL_THETA
#define GENERATEINSPIRALH_EDFDT
Waveform sampling interval is too large.
void LALGenerateInspiral(LALStatus *status, CoherentGW *waveform, SimInspiralTable *thisEvent, PPNParamStruc *ppnParams)
#define GENERATEINSPIRAL_OMEGAS
#define GENERATEINSPIRAL_ZETA2
#define GENERATEINSPIRAL_SOURCETHETA
#define GENERATEINSPIRALH_ENULL
Null pointer.
void LALGeneratePPNInspiral(LALStatus *stat, CoherentGW *output, PPNParamStruc *params)
Computes a parametrized post-Newtonian inspiral waveform.
void LALGeneratePPNAmpCorInspiral(LALStatus *stat, CoherentGW *output, PPNParamStruc *params)
Computes a parametrized post-Newtonian inspiral waveform with ampltidude corrections.
int LALInfo(LALStatus *status, const char *info)
int XLALGetInteractionFromString(const CHAR *inString)
XLAL function to determine LALInspiralInteraction from a string.
#define LALINSPIRALH_ENOWAVEFORM
No Waveform generated.
@ m1Andm2
component masses
@ LAL_INSPIRAL_INTERACTION_TIDAL_5PN
Leading-order tidal interaction.
@ LAL_INSPIRAL_INTERACTION_ALL
all spin and tidal interactions
@ LAL_INSPIRAL_INTERACTION_TIDAL_6PN
Next-to-leading-order tidal interaction.
@ LAL_INSPIRAL_INTERACTION_SPIN_ORBIT_25PN
Next-to-leading-order spin-orbit interaction.
@ LAL_INSPIRAL_INTERACTION_QUAD_MONO_2PN
Quadrupole-monopole interaction.
@ LAL_INSPIRAL_INTERACTION_SPIN_ORBIT_3PN
Spin-spin interaction.
@ LAL_INSPIRAL_INTERACTION_NONE
No spin, tidal or other interactions.
@ LAL_INSPIRAL_INTERACTION_SPIN_SPIN_2PN
Spin-spin interaction.
@ LAL_INSPIRAL_INTERACTION_SPIN_ORBIT_15PN
Leading order spin-orbit interaction.
@ LAL_INSPIRAL_INTERACTION_ALL_SPIN
all spin interactions, no tidal interactions
@ LAL_INSPIRAL_INTERACTION_SPIN_SPIN_SELF_2PN
Spin-spin-self interaction.
COORDINATESYSTEM_EQUATORIAL
void LALSDestroyVector(LALStatus *, REAL4Vector **)
void LALSCreateVector(LALStatus *, REAL4Vector **, UINT4)
int XLALPrintError(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
REAL4TimeVectorSeries * a
REAL4TimeVectorSeries * h
The inspiral waveform parameter structure containing information about the waveform to be generated.
Approximant approximant
Post-Newtonain approximant to be used in generating the wave (input)
UINT4 inspiralOnly
UNDOCUMENTED.
REAL8 fFinal
final frequency reached, in units of Hz (output)
UINT4 fixedStep
UNDOCUMENTED.
LALPNOrder order
Post-Newtonain order to be used in generating the wave (input)
LALInspiralInteraction interaction
UNDOCUMENTED.
LALSimInspiralFrameAxis axisChoice
UNDOCUMENTED.
This structure stores the parameters for constructing a restricted post-Newtonian waveform.
REAL4 fStopIn
The requested termination frequency of the waveform, in Hz; If set to 0, the waveform will be generat...
REAL4Vector * ppn
The parameters selecting the type of post-Newtonian expansion; If ppn=NULL, a "normal" (physical) ex...
REAL4 dfdt
The maximum value of encountered over any timestep used in generating the waveform.
LIGOTimeGPS epoch
start time of output time series
REAL4 phi
The phase at coalescence (or arbitrary reference phase for a post -Newtonian approximation),...
REAL4 psi
polarization angle (radians)
SkyPosition position
location of source on sky
REAL4 eta
The mass ratio of the binary system; Physically this parameter must lie in the range ; values outsid...
REAL8 tc
The time from the start of the waveform to coalescence (in the point-mass approximation),...
REAL4 mTot
The total mass of the binary system, in solar masses.
REAL4 fStartIn
The requested starting frequency of the waveform, in Hz.
REAL4 d
The distance to the system, in metres.
REAL4 inc
The inclination of the system to the line of sight, in radians.
CHAR waveform[LIGOMETA_WAVEFORM_MAX]