43#include <lal/LALInspiralBank.h>
44#include <lal/LALNoiseModels.h>
46#define METRIC_DIMENSION 2
366 const REAL8 two_pi_flower_sq = two_pi_flower * two_pi_flower;
369 if (!metric || !moments){
374 if (
t0 <= 0.L || t3 <= 0.L){
397 PNorder = (
UINT4) order;
411 for ( k = 0 ; k <= PNorder; k++ )
413 for (
l = 0;
l <= PNorder;
l++ )
415 g[
m][
n] += Psi[
m][k] * Psi[
n][
l] * (
416 moments->
j[17-k-
l] - moments->
j[12-k] * moments->
j[12-
l]
417 - ( moments->
j[9-k] - moments->
j[4] * moments->
j[12-k] )
418 * ( moments->
j[9-
l] - moments->
j[4] * moments->
j[12-
l] )
419 / ( moments->
j[1] - moments->
j[4] * moments->
j[4] )
429 The minimum sampling rate
for given MM is
431 2 *
LAL_PI * f0 sqrt( (moments.
j[1] - moments.
j[4]*moments.
j[4]) /
438 a = g[0][0] * two_pi_flower_sq;
439 b = g[0][1] * two_pi_flower_sq;
440 c = g[1][1] * two_pi_flower_sq;
449 q = sqrt( (
a-
c)*(
a-
c) + 4. * b*b );
451 metric->
g00 = 0.5 * (
a +
c -
q);
452 metric->
g11 = 0.5 * (
a +
c +
q);
464 metric->
theta = atan( b / (metric->
g00 -
c) );
473 metric->
Gamma[0] = 0.5*two_pi_flower_sq*
474 ( moments->
j[1] - (moments->
j[4]*moments->
j[4]) );
476 metric->
Gamma[1] = 0.5*two_pi_flower_sq*
477 ( Psi[0][0]*(moments->
j[9] - (moments->
j[4]*moments->
j[12]) )
478 + Psi[0][2]*(moments->
j[7] - (moments->
j[4]*moments->
j[10]) )
479 + Psi[0][4]*(moments->
j[5] - (moments->
j[4]*moments->
j[8]) ));
481 metric->
Gamma[2] = 0.5*two_pi_flower_sq*
482 ( Psi[1][2]*(moments->
j[7] - (moments->
j[4]*moments->
j[10]) )
483 + Psi[1][3]*(moments->
j[6] - (moments->
j[4]*moments->
j[9]) )
484 + Psi[1][4]*(moments->
j[5] - (moments->
j[4]*moments->
j[8]) ));
507 Psi[0][0] = moments->
a01;
509 Psi[0][2] = moments->
a21/t2 + moments->
a22/3.L * cbrt(t2 * t2 / (t1 * t1));
511 Psi[0][4] = moments->
a41/(t2*t2) + moments->
a42/(3.L* cbrt(t1*t1*t2))
512 - moments->
a43/3.L * t2 / t1 * cbrt(t2 / t1);
516 Psi[1][2] = -moments->
a21*t1/(t2*t2) + 2.L *
517 moments->
a22/3.L * cbrt(t1/t2);
518 Psi[1][3] = moments->
a31;
519 Psi[1][4] = - 2.L * moments->
a41*t1 / (t2*t2*t2) -
520 moments->
a42/3.L * cbrt(t1/(t2*t2*t2*t2)) +
521 4.L * moments->
a43/3.L * cbrt(t2/t1);
545 moments.
n0 = 5.L/3.L;
546 moments.
n15 = 2.L/3.L;
551 num = moments.
M3[0][0] *moments.
M3[1][1]
552 - moments.
M3[0][1] * moments.
M3[1][0];
554 g[0][0] =moments.
M2[0][0]*(moments.
M3[1][1]*moments.
M2[0][0]
555 -moments.
M3[0][1]*moments.
M2[0][1])
556 +moments.
M2[0][1]*(-moments.
M3[0][1]*moments.
M2[0][0]
557 +moments.
M3[0][0]*moments.
M2[0][1]);
561 g[1][1] =moments.
M2[0][1]*(moments.
M3[1][1]*moments.
M2[0][1]
562 -moments.
M3[0][1]*moments.
M2[1][1])
563 +moments.
M2[1][1]*(-moments.
M3[0][1]*moments.
M2[0][1]
564 +moments.
M3[0][0]*moments.
M2[1][1]);
568 g[0][1] = moments.
M2[0][0]*(moments.
M3[1][1]*moments.
M2[0][1]
569 -moments.
M3[0][1]*moments.
M2[1][1])
570 +moments.
M2[0][1]*(-moments.
M3[0][1]*moments.
M2[0][1]
571 +moments.
M3[0][0]*moments.
M2[1][1]);
574 metric->
G00 = .5 *(moments.
M1[0][0] - g[0][0] );
575 metric->
G01 = .5 *(moments.
M1[0][1] - g[0][1] );
576 metric->
G11 = .5 *(moments.
M1[1][1] - g[1][1] );
581 q = sqrt( (
a-
c)*(
a-
c) + 4. * b*b );
582 metric->
g00 = 0.5 * (
a +
c -
q);
583 metric->
g11 = 0.5 * (
a +
c +
q);
594 metric->
theta = atan(b/(metric->
g00 -
c));
602#undef METRIC_DIMENSION
static void InspiralComputeMetricGetPsiCoefficients(REAL8 Psi[METRIC_DIMENSION][METRIC_ORDER], InspiralMomentsEtc *moments, REAL8 fLower, REAL8 t0, REAL8 t3)
#define CHECKSTATUSPTR(statusptr)
#define ATTATCHSTATUSPTR(statusptr)
#define DETATCHSTATUSPTR(statusptr)
#define INITSTATUS(statusptr)
#define RETURN(statusptr)
void LALInspiralComputeMetricBCV(LALStatus *status, InspiralMetric *metric, REAL8FrequencySeries *psd, InspiralTemplate *params)
UNDOCUMENTED.
int XLALInspiralComputeMetric(InspiralMetric *metric, InspiralMomentsEtc *moments, REAL8 fLower, LALPNOrder order, REAL8 t0, REAL8 t3)
Function to compute the components of the metric which is used to describe distances on the signal ma...
void LALGetInspiralMomentsBCV(LALStatus *status, InspiralMomentsEtcBCV *moments, REAL8FrequencySeries *psd, InspiralTemplate *params)
void LALInspiralComputeMetric(LALStatus *status, InspiralMetric *metric, InspiralTemplate *params, InspiralMomentsEtc *moments)
LAL_PNORDER_ONE_POINT_FIVE
int XLALPrintError(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
int int XLALPrintWarning(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
#define XLAL_PRINT_DEPRECATION_WARNING(replacement)
Structure to store metric at various points the signal manifold.
REAL4 Gamma[10]
3d metric co-efficients in coordinates; Gamma[6] is a vector that stores the upper triangular part o...
REAL8 g11
11-component of the diagonalised metric
REAL8 G01
01-component of the metric in coordinates
REAL8 g00
00-component of the diagonalised metric
REAL8 theta
Angle from tau0 to semi-major axis of the ellipse.
REAL8 G00
00-component of the metric in coordinates
REAL8 G11
11-component of the metric in coordinates
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(...
The inspiral waveform parameter structure containing information about the waveform to be generated.