59#include <lal/LALInspiralBank.h>
60#include <lal/Integrate.h>
109 if (fLower <= 0 || fCutoff <= fLower){
115 moments->
a01 = 3.L/5.L;
118 moments->
a31 = -3.L/2.L;
120 moments->
a42 = 5429.L/5376.L * cbrt(25.L*
LAL_PI/2.L);
127 xmin = fLower / fLower;
128 xmax = fCutoff / fLower;
137 norm = moments->
j[7];
140 for ( k = 1; k <= 17; ++k )
142 ndx = (
REAL8) k / 3.L;
185 for ( k = 0; k <= 22; ++k )
202 in.
norm = moments->
i[7] -2.*moments->
alpha * moments->
i[5] +
207 moments->
M1[0][0] = (moments->
i[17] -2.*moments->
alpha * moments->
i[15] +
210 moments->
M1[0][1] = (moments->
i[14] -2.*moments->
alpha * moments->
i[12] +
213 moments->
M1[1][1] = (moments->
i[11] -2.*moments->
alpha * moments->
i[9] +
216 moments->
M1[1][0]=moments->
M1[0][1] ;
219 moments->
M2[0][0] = (moments->
i[12] -2.*moments->
alpha * moments->
i[10] +
223 moments->
M2[0][1] = (moments->
i[9] -2.*moments->
alpha * moments->
i[7] +
227 moments->
M2[1][0] = (moments->
i[9] -2.*moments->
alpha * moments->
i[7] +
230 moments->
M2[1][1] = (moments->
i[6] -2.*moments->
alpha * moments->
i[4] +
234 moments->
M3[0][0] = (moments->
i[7] -2.*moments->
alpha * moments->
i[5] +
237 moments->
M3[0][1] = (moments->
i[4] -2.*moments->
alpha * moments->
i[2] +
240 moments->
M3[1][1] = (moments->
i[1] -2.*moments->
alpha * moments->
i[18] +
243 moments->
M3[1][0]=moments->
M3[0][1] ;
305 size_t k, kMin, kMax;
313 if (xmin <= 0 || xmax <= 0 || xmax <= xmin || norm <= 0) {
314 XLALPrintError(
"xmin, xmax, and norm must be positive and xmax must be greater than xmin\n");
325 kMax = floor((xmax - f0) / deltaF);
326 if ( (xmin < f0) || (kMax > shf->
data->
length) ) {
330 kMin = floor((xmin - f0) / deltaF);
334 const REAL8 f = f0 + kMin * deltaF;
335 moment += pow( f, -(ndx) ) / ( 2.0 * shf->
data->
data[kMin] );
338 for ( k = kMin + 1; k < kMax; ++k ) {
341 const REAL8 f = f0 + k * deltaF;
342 moment += pow( f, -(ndx) ) / psd_val;
347 if ( kMax < shf->
data->length && shf->
data->
data[kMax] ) {
348 const REAL8 f = f0 + kMax * deltaF;
349 moment += pow( f, -(ndx) ) / ( 2.0 * shf->
data->
data[kMax] );
#define CHECKSTATUSPTR(statusptr)
#define ATTATCHSTATUSPTR(statusptr)
#define DETATCHSTATUSPTR(statusptr)
#define INITSTATUS(statusptr)
#define RETURN(statusptr)
int LALPrintError(const char *fmt,...)
REAL8 XLALInspiralMoments(REAL8 xmin, REAL8 xmax, REAL8 ndx, REAL8 norm, REAL8FrequencySeries *shf)
void LALInspiralMoments(LALStatus *status, REAL8 *moment, InspiralMomentsIn pars)
int XLALGetInspiralMoments(InspiralMomentsEtc *moments, REAL8 fLower, REAL8 fCutoff, REAL8FrequencySeries *psd)
void LALGetInspiralMoments(LALStatus *status, InspiralMomentsEtc *moments, REAL8FrequencySeries *psd, InspiralTemplate *params)
void LALGetInspiralMomentsBCV(LALStatus *status, InspiralMomentsEtcBCV *moments, REAL8FrequencySeries *psd, InspiralTemplate *params)
#define XLAL_ERROR_REAL8(...)
int XLALPrintError(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
#define XLAL_PRINT_DEPRECATION_WARNING(replacement)
#define XLAL_IS_REAL8_FAIL_NAN(val)
Parameter structure that holds the moments of the PSD and other useful constants required in the comp...
REAL8 j[18]
The required moments are all computed once and stored in this array; The required moments are from J(...
Inputs to the function that computes the moments of the PSD.
REAL8FrequencySeries * shf
the frequency series containing the noise psd
REAL8 norm
norm to be used in computing the moment, the returned value is the above integral divided by the norm
REAL8 ndx
index (without the negative sign) in the moment integral as above
REAL8 xmax
upper limit of the integral
REAL8 xmin
lower limit of the integral
The inspiral waveform parameter structure containing information about the waveform to be generated.