36#include <gsl/gsl_vector.h>
37#include <gsl/gsl_matrix.h>
40#include <lal/LALConstants.h>
42#include <lal/LALInitBarycenter.h>
43#include <lal/AVFactories.h>
44#include <lal/SkyCoordinates.h>
45#include <lal/ComputeFstat.h>
46#include <lal/GetEarthTimes.h>
47#include <lal/SFTfileIO.h>
49#include <lal/ComputeFstat.h>
50#include <lal/UniversalDopplerMetric.h>
59#define METRIC_DIM 2 + NUM_SPINS
63#define SCALAR(u,v) ((u)[0]*(v)[0] + (u)[1]*(v)[1] + (u)[2]*(v)[2])
66#define COPY_VECT(dst,src) do { (dst)[0] = (src)[0]; (dst)[1] = (src)[1]; (dst)[2] = (src)[2]; } while(0)
68#define SQ(x) ((x) * (x))
78typedef struct tagOldDopplerMetric {
86 gsl_matrix *
m1_ij, *m2_ij, *m3_ij;
150 gsl_matrix *m1_ij, gsl_matrix *m2_ij, gsl_matrix *m3_ij,
156int outer_product( gsl_matrix *ret_ij,
const gsl_vector *u_i,
const gsl_vector *v_j );
165void gauleg(
double x1,
double x2,
double x[],
double w[],
int n );
224 config.multidPhi =
getMultiPhaseDerivs( config.multiDetStates, &( config.dopplerPoint ), config.phaseType );
240 for (
UINT4 X = 0; X < config.multiNoiseWeights->length; X++ ) {
243 XLALFree( config.multiNoiseWeights->data );
244 XLALFree( config.multiNoiseWeights );
261 gsl_matrix_free(
metric->g_ij );
264 gsl_matrix_free(
metric->gF_ij );
267 gsl_matrix_free(
metric->gFav_ij );
270 gsl_matrix_free(
metric->m1_ij );
273 gsl_matrix_free(
metric->m2_ij );
276 gsl_matrix_free(
metric->m3_ij );
278 if (
metric->Fisher_ab ) {
279 gsl_matrix_free(
metric->Fisher_ab );
312 XLAL_CHECK( (
m1->g_ij = gsl_matrix_calloc( len1 =
m2->g_ij->size1, len2 =
m2->g_ij->size2 ) ),
XLAL_ENOMEM,
"Failed: g_ij = gsl_matrix_calloc(%d,%d)\n", len1, len2 );
315 XLAL_CHECK( (
m1->gF_ij = gsl_matrix_calloc( len1 =
m2->gF_ij->size1, len2 =
m2->gF_ij->size2 ) ),
XLAL_ENOMEM,
"Failed: gF_ij = gsl_matrix_calloc(%d,%d)\n", len1, len2 );
318 XLAL_CHECK( (
m1->gFav_ij = gsl_matrix_calloc( len1 =
m2->gFav_ij->size1, len2 =
m2->gFav_ij->size2 ) ),
XLAL_ENOMEM,
"Failed: gFav_ij = gsl_matrix_calloc(%d,%d)\n", len1, len2 );
321 XLAL_CHECK( (
m1->m1_ij = gsl_matrix_calloc( len1 =
m2->m1_ij->size1, len2 =
m2->m1_ij->size2 ) ),
XLAL_ENOMEM,
"Failed: m1_ij = gsl_matrix_calloc(%d,%d)\n", len1, len2 );
324 XLAL_CHECK( (
m1->m2_ij = gsl_matrix_calloc( len1 =
m2->m2_ij->size1, len2 =
m2->m2_ij->size2 ) ),
XLAL_ENOMEM,
"Failed: m2_ij = gsl_matrix_calloc(%d,%d)\n", len1, len2 );
327 XLAL_CHECK( (
m1->m3_ij = gsl_matrix_calloc( len1 =
m2->m3_ij->size1, len2 =
m2->m3_ij->size2 ) ),
XLAL_ENOMEM,
"Failed: m3_ij = gsl_matrix_calloc(%d,%d)\n", len1, len2 );
329 if (
m2->Fisher_ab ) {
330 XLAL_CHECK( (
m1->Fisher_ab = gsl_matrix_calloc( len1 =
m2->Fisher_ab->size1, len2 =
m2->Fisher_ab->size2 ) ),
XLAL_ENOMEM,
"Failed: Fisher_ab = gsl_matrix_calloc(%d,%d)\n", len1, len2 );
337 memcpy( &(
m1->meta ), &(
m2->meta ),
sizeof(
m1->meta ) );
342 XLAL_CHECK( ( ret = gsl_matrix_add(
m1->g_ij,
m2->g_ij ) ) == 0,
XLAL_EFAILED,
"g_ij: gsl_matrix_add() failed with status=%d\n", ret );
345 XLAL_CHECK( ( ret = gsl_matrix_add(
m1->gF_ij,
m2->gF_ij ) ) == 0,
XLAL_EFAILED,
"gF_ij: gsl_matrix_add() failed with status=%d\n", ret );
348 XLAL_CHECK( ( ret = gsl_matrix_add(
m1->gFav_ij,
m2->gFav_ij ) ) == 0,
XLAL_EFAILED,
"gFav_ij: gsl_matrix_add() failed with status=%d\n", ret );
351 XLAL_CHECK( ( ret = gsl_matrix_add(
m1->m1_ij,
m2->m1_ij ) ) == 0,
XLAL_EFAILED,
"m1_ij: gsl_matrix_add() failed with status=%d\n", ret );
354 XLAL_CHECK( ( ret = gsl_matrix_add(
m1->m2_ij,
m2->m2_ij ) ) == 0,
XLAL_EFAILED,
"m2_ij: gsl_matrix_add() failed with status=%d\n", ret );
357 XLAL_CHECK( ( ret = gsl_matrix_add(
m1->m3_ij,
m2->m3_ij ) ) == 0,
XLAL_EFAILED,
"m3_ij: gsl_matrix_add() failed with status=%d\n", ret );
359 if (
m2->Fisher_ab ) {
360 XLAL_CHECK( ( ret = gsl_matrix_add(
m1->Fisher_ab,
m2->Fisher_ab ) ) == 0,
XLAL_EFAILED,
"Fisher_ab: gsl_matrix_add() failed with status=%d\n", ret );
364 m1->maxrelerr_gPh = sqrt(
SQ(
m1->maxrelerr_gPh ) +
SQ(
m2->maxrelerr_gPh ) );
365 m1->maxrelerr_gF = sqrt(
SQ(
m1->maxrelerr_gF ) +
SQ(
m2->maxrelerr_gF ) );
368 m1->rho2 +=
m2->rho2;
402 if (
m->Fisher_ab ) {
407 m->maxrelerr_gPh *=
scale;
425 gsl_matrix *m1_ij, gsl_matrix *m2_ij, gsl_matrix *m3_ij,
431 gsl_matrix *P1_ij, *P2_ij, *P3_ij;
432 gsl_vector *a2_dPhi_i, *b2_dPhi_i, *ab_dPhi_i;
434 gsl_matrix *Q1_ij, *Q2_ij, *Q3_ij;
437 gsl_matrix *mat1, *mat2;
440 gsl_matrix *a2_a2, *a2_b2, *a2_ab;
441 gsl_matrix *b2_b2, *b2_ab;
448 XLAL_CHECK( ( gF_ij != NULL ) && ( gFav_ij != NULL ) && ( m1_ij != NULL ) && ( m2_ij != NULL ) && ( m3_ij != NULL ),
XLAL_EINVAL );
493 gsl_matrix *P1_Xij, *P2_Xij, *P3_Xij;
494 gsl_vector *a2_dPhi_Xi, *b2_dPhi_Xi, *ab_dPhi_Xi;
504 for (
i = 0;
i < numSteps;
i ++ ) {
515 gsl_vector_set( dPhi_i, 0, dPhi->
dFreq->
data[
i] );
516 gsl_vector_set( dPhi_i, 1, dPhi->
dAlpha->
data[
i] );
517 gsl_vector_set( dPhi_i, 2, dPhi->
dDelta->
data[
i] );
518 gsl_vector_set( dPhi_i, 3, dPhi->
df1dot->
data[
i] );
523 gsl_matrix_memcpy( mat2, mat1 );
524 gsl_matrix_scale( mat2,
a2 );
525 gsl_matrix_add( P1_Xij, mat2 );
528 gsl_matrix_memcpy( mat2, mat1 );
529 gsl_matrix_scale( mat2,
b2 );
530 gsl_matrix_add( P2_Xij, mat2 );
533 gsl_matrix_memcpy( mat2, mat1 );
534 gsl_matrix_scale( mat2, ab );
535 gsl_matrix_add( P3_Xij, mat2 );
538 gsl_vector_memcpy( vec, dPhi_i );
539 gsl_vector_scale( vec,
a2 );
540 gsl_vector_add( a2_dPhi_Xi, vec );
543 gsl_vector_memcpy( vec, dPhi_i );
544 gsl_vector_scale( vec,
b2 );
545 gsl_vector_add( b2_dPhi_Xi, vec );
548 gsl_vector_memcpy( vec, dPhi_i );
549 gsl_vector_scale( vec, ab );
550 gsl_vector_add( ab_dPhi_Xi, vec );
554 gsl_matrix_add( P1_ij, P1_Xij );
555 gsl_matrix_add( P2_ij, P2_Xij );
556 gsl_matrix_add( P3_ij, P3_Xij );
558 gsl_vector_add( a2_dPhi_i, a2_dPhi_Xi );
560 gsl_vector_add( b2_dPhi_i, b2_dPhi_Xi );
562 gsl_vector_add( ab_dPhi_i, ab_dPhi_Xi );
564 gsl_matrix_free( P1_Xij );
565 gsl_matrix_free( P2_Xij );
566 gsl_matrix_free( P3_Xij );
568 gsl_vector_free( a2_dPhi_Xi );
569 gsl_vector_free( b2_dPhi_Xi );
570 gsl_vector_free( ab_dPhi_Xi );
591 gsl_matrix_memcpy( mat1, ab_ab );
592 gsl_matrix_scale( mat1,
A /
D );
593 gsl_matrix_memcpy( Q1_ij, mat1 );
595 gsl_matrix_memcpy( mat1, a2_a2 );
596 gsl_matrix_scale( mat1,
B /
D );
597 gsl_matrix_add( Q1_ij, mat1 );
599 gsl_matrix_memcpy( mat1, a2_ab );
600 gsl_matrix_scale( mat1, - 2.0 *
C /
D );
601 gsl_matrix_add( Q1_ij, mat1 );
606 gsl_matrix_memcpy( mat1, b2_b2 );
607 gsl_matrix_scale( mat1,
A /
D );
608 gsl_matrix_memcpy( Q2_ij, mat1 );
610 gsl_matrix_memcpy( mat1, ab_ab );
611 gsl_matrix_scale( mat1,
B /
D );
612 gsl_matrix_add( Q2_ij, mat1 );
614 gsl_matrix_memcpy( mat1, b2_ab );
615 gsl_matrix_scale( mat1, - 2.0 *
C /
D );
616 gsl_matrix_add( Q2_ij, mat1 );
621 gsl_matrix_memcpy( mat1, b2_ab );
622 gsl_matrix_scale( mat1,
A /
D );
623 gsl_matrix_memcpy( Q3_ij, mat1 );
625 gsl_matrix_memcpy( mat1, a2_ab );
626 gsl_matrix_scale( mat1,
B /
D );
627 gsl_matrix_add( Q3_ij, mat1 );
629 gsl_matrix_memcpy( mat1, a2_b2 );
630 gsl_matrix_add( mat1, ab_ab );
631 gsl_matrix_scale( mat1, - 1.0 *
C /
D );
632 gsl_matrix_add( Q3_ij, mat1 );
637 gsl_matrix_memcpy( m1_ij, P1_ij );
638 gsl_matrix_sub( m1_ij, Q1_ij );
640 gsl_matrix_memcpy( m2_ij, P2_ij );
641 gsl_matrix_sub( m2_ij, Q2_ij );
643 gsl_matrix_memcpy( m3_ij, P3_ij );
644 gsl_matrix_sub( m3_ij, Q3_ij );
650 gsl_matrix_memcpy( gF_ij, m1_ij );
651 gsl_matrix_scale( gF_ij, cfg->
Al1 );
653 gsl_matrix_memcpy( mat1, m2_ij );
654 gsl_matrix_scale( mat1, cfg->
Al2 );
655 gsl_matrix_add( gF_ij, mat1 );
657 gsl_matrix_memcpy( mat1, m3_ij );
658 gsl_matrix_scale( mat1, 2.0 * cfg->
Al3 );
659 gsl_matrix_add( gF_ij, mat1 );
661 gsl_matrix_scale( gF_ij, 1.0 / AMA );
664 gsl_matrix_memcpy( gFav_ij, m1_ij );
665 gsl_matrix_scale( gFav_ij,
B );
667 gsl_matrix_memcpy( mat1, m2_ij );
668 gsl_matrix_scale( mat1,
A );
669 gsl_matrix_add( gFav_ij, mat1 );
671 gsl_matrix_memcpy( mat1, m3_ij );
672 gsl_matrix_scale( mat1, - 2.0 *
C );
673 gsl_matrix_add( gFav_ij, mat1 );
675 gsl_matrix_scale( gFav_ij, 1.0 / ( 2.0 *
D ) );
679 gsl_vector_free( dPhi_i );
681 gsl_matrix_free( mat1 );
682 gsl_matrix_free( mat2 );
683 gsl_vector_free( vec );
685 gsl_matrix_free( P1_ij );
686 gsl_matrix_free( P2_ij );
687 gsl_matrix_free( P3_ij );
689 gsl_vector_free( a2_dPhi_i );
690 gsl_vector_free( b2_dPhi_i );
691 gsl_vector_free( ab_dPhi_i );
693 gsl_matrix_free( Q1_ij );
694 gsl_matrix_free( Q2_ij );
695 gsl_matrix_free( Q3_ij );
697 gsl_matrix_free( a2_a2 );
698 gsl_matrix_free( a2_b2 );
699 gsl_matrix_free( a2_ab );
701 gsl_matrix_free( b2_b2 );
702 gsl_matrix_free( b2_ab );
704 gsl_matrix_free( ab_ab );
722 gsl_matrix *dPhi_i_dPhi_j;
726 gsl_matrix *aPhi_i_aPhi_j;
750 for (
i = 0;
i < numSteps;
i ++ ) {
752 gsl_vector_set( dPhi_i, 0, dPhi->
dFreq->
data[
i] );
753 gsl_vector_set( dPhi_i, 1, dPhi->
dAlpha->
data[
i] );
754 gsl_vector_set( dPhi_i, 2, dPhi->
dDelta->
data[
i] );
755 gsl_vector_set( dPhi_i, 3, dPhi->
df1dot->
data[
i] );
760 gsl_vector_scale( dPhi_i, wi );
761 gsl_matrix_scale( dPhi_i_dPhi_j, wi );
764 gsl_vector_add( aPhi_i, dPhi_i );
767 gsl_matrix_add( aPhi_ij, dPhi_i_dPhi_j );
775 gsl_matrix_memcpy( g_ij, aPhi_ij );
776 gsl_matrix_sub( g_ij, aPhi_i_aPhi_j );
779 gsl_vector_free( dPhi_i );
780 gsl_matrix_free( dPhi_i_dPhi_j );
781 gsl_matrix_free( aPhi_ij );
782 gsl_vector_free( aPhi_i );
783 gsl_matrix_free( aPhi_i_aPhi_j );
833 UINT4 numSteps = 2000;
846 for (
UINT4 i = 0;
i < numSteps;
i ++ ) {
886 for (
UINT4 i = 0;
i < numSteps;
i ++ ) {
902 REAL8 cos2psi = cos( 2.0 * psi );
903 REAL8 sin2psi = sin( 2.0 * psi );
904 cfg->
Al1 =
SQ( Aplus ) *
SQ( cos2psi ) +
SQ( Across ) *
SQ( sin2psi );
905 cfg->
Al2 =
SQ( Aplus ) *
SQ( sin2psi ) +
SQ( Across ) *
SQ( cos2psi );
906 cfg->
Al3 = (
SQ( Aplus ) -
SQ( Across ) ) * sin2psi * cos2psi ;
966 vn[2] = sin(
Delta );
972 REAL8 tMidnight, tAutumn;
993 mdPhi->
data[X] = dPhi;
995 for (
UINT4 i = 0;
i < numStepsX;
i++ ) {
1009 switch ( phaseType ) {
1047 + rX[2] * cos(
Delta ) );
1077 if ( ( ret_ij->size1 != ret_ij->size2 ) ) {
1080 if ( ( g_ij->size1 != g_ij->size2 ) ) {
1084 for (
i = 0;
i < ret_ij->size1;
i ++ ) {
1085 for (
j = 0;
j < ret_ij->size2;
j ++ ) {
1086 if (
i ==
c ||
j ==
c ) {
1087 gsl_matrix_set( ret_ij,
i,
j, 0.0 );
1089 gsl_matrix_set( ret_ij,
i,
j, ( gsl_matrix_get( g_ij,
i,
j ) - ( gsl_matrix_get( g_ij,
i,
c ) * gsl_matrix_get( g_ij,
j,
c ) / gsl_matrix_get( g_ij,
c,
c ) ) ) );
1105outer_product( gsl_matrix *ret_ij,
const gsl_vector *u_i,
const gsl_vector *v_j )
1109 if ( !ret_ij || !u_i || !v_j ) {
1113 if ( ( ret_ij->size1 != u_i->size ) || ( ret_ij->size2 != v_j->size ) ) {
1118 for (
i = 0;
i < ret_ij->size1;
i ++ )
1119 for (
j = 0;
j < ret_ij->size2;
j ++ ) {
1120 gsl_matrix_set( ret_ij,
i,
j, gsl_vector_get( u_i,
i ) * gsl_vector_get( v_j,
j ) );
1138 if ( mat->size1 != mat->size2 ) {
1142 tmp = gsl_matrix_calloc( mat->size1, mat->size2 );
1144 gsl_matrix_transpose_memcpy( tmp, mat );
1146 gsl_matrix_add( mat, tmp );
1148 gsl_matrix_scale( mat, 0.5 );
1150 gsl_matrix_free( tmp );
1165 if ( !mat || !vec ) {
1168 if ( ( mat->size1 != mat->size2 ) || ( mat->size1 != vec->size ) ) {
1172 for (
i = 0;
i < mat->size1;
i ++ )
1173 for (
j = 0;
j < mat->size2;
j ++ ) {
1174 ret += gsl_vector_get( vec,
i ) * gsl_matrix_get( mat,
i,
j ) * gsl_vector_get( vec,
j );
1205 posvel->
pos[0] = tRev * cos( rev );
1206 posvel->
pos[1] = tRev * sin( rev ) *
cosi;
1207 posvel->
pos[2] = tRev * sin( rev ) * sini;
1210 posvel->
vel[0] = -vRev * sin( rev );
1211 posvel->
vel[1] = vRev * cos( rev ) *
cosi;
1212 posvel->
vel[2] = vRev * cos( rev ) * sini;
1232 for ( X = 0; X <
numDet; X ++ ) {
1265gauleg(
double x1,
double x2,
double x[],
double w[],
int n )
1269 double z1, z, xm, xl,
pp, p3, p2, p1;
1275 xm = 0.5 * ( x2 + x1 );
1276 xl = 0.5 * ( x2 - x1 );
1278 for (
i = 1;
i <=
m;
i++ ) {
1279 z = cos(
LAL_PI * (
i - 0.25 ) / (
n + 0.5 ) );
1289 for (
j = 1;
j <=
n;
j++ ) {
1293 p1 = ( ( 2.0 *
j - 1.0 ) * z * p2 - (
j - 1.0 ) * p3 ) /
j;
1298 pp =
n * ( z * p1 - p2 ) / ( z * z - 1.0 );
1302 }
while ( fabs( z - z1 ) >
EPS );
1304 x[
i - 1] = xm - xl * z;
1306 x[
n + 1 -
i - 1] = xm + xl * z;
1309 w[
i - 1] = 2.0 * xl / ( ( 1.0 - z * z ) *
pp *
pp );
1311 w[
n + 1 -
i - 1] =
w[
i - 1];
#define __func__
log an I/O error, i.e.
const double scale
multiplicative scaling factor of the coordinate
void XLALDestroyMultiDetectorStateSeries(MultiDetectorStateSeries *mdetStates)
Helper function to get rid of a multi-IFO DetectorStateSeries Note, this is "NULL-robust" in the sens...
DetectorStateSeries * XLALGetDetectorStates(const LIGOTimeGPSVector *timestamps, const LALDetector *detector, const EphemerisData *edat, REAL8 tOffset)
Get the 'detector state' (ie detector-tensor, position, velocity, etc) for the given vector of timest...
int XLALGetEarthTimes(const LIGOTimeGPS *tepoch, REAL8 *tMidnight, REAL8 *tAutumn)
This function takes a GPS time from tepoch and uses it to assign tAutumn and tMidnight,...
void XLALDestroyMultiAMCoeffs(MultiAMCoeffs *multiAMcoef)
Destroy a MultiAMCoeffs structure.
MultiAMCoeffs * XLALComputeMultiAMCoeffs(const MultiDetectorStateSeries *multiDetStates, const MultiNoiseWeights *multiWeights, SkyPosition skypos)
Multi-IFO version of XLALComputeAMCoeffs().
#define XLAL_INIT_DECL(var,...)
void * XLALCalloc(size_t m, size_t n)
LIGOTimeGPSVector * XLALCreateTimestampVector(UINT4 len)
Allocate a LIGOTimeGPSVector.
void XLALDestroyTimestampVector(LIGOTimeGPSVector *vect)
De-allocate a LIGOTimeGPSVector.
int XLALSegListIsInitialized(const LALSegList *seglist)
COORDINATESYSTEM_EQUATORIAL
@ DOPPLERCOORD_DELTA
Declination [Units: radians].
@ DOPPLERCOORD_F1DOT
First spindown [Units: Hz/s].
@ DOPPLERCOORD_ALPHA
Right ascension [Units: radians].
@ DOPPLERCOORD_FREQ
Frequency [Units: Hz].
@ DETMOTION_SPIN
Full spin motion.
@ DETMOTION_PTOLEORBIT
Ptolemaic (circular) orbital motion.
@ DETMOTION_ORBIT
Ephemeris-based orbital motion.
REAL8Vector * XLALCreateREAL8Vector(UINT4 length)
void XLALDestroyREAL8Vector(REAL8Vector *vector)
#define XLAL_ERROR_VOID(...)
#define XLAL_ERROR_NULL(...)
#define XLAL_CHECK(assertion,...)
#define XLAL_CHECK_NULL(assertion,...)
LIGOTimeGPS * XLALGPSSetREAL8(LIGOTimeGPS *epoch, REAL8 t)
REAL8 XLALGPSGetREAL8(const LIGOTimeGPS *epoch)
REAL8 XLALGPSDiff(const LIGOTimeGPS *t1, const LIGOTimeGPS *t0)
int symmetrize(gsl_matrix *mat)
int outer_product(gsl_matrix *ret_ij, const gsl_vector *u_i, const gsl_vector *v_j)
Calculate the outer product ret_ij of vectors u_i and v_j, given by ret_ij = u_i v_j The output-matri...
#define COPY_VECT(dst, src)
copy 3 components of Euklidean vector
void gauleg(double x1, double x2, double x[], double w[], int n)
OldDopplerMetric * XLALOldDopplerFstatMetric(const OldMetricType_t metricType, const DopplerMetricParams *metricParams, const EphemerisData *edat)
The only purpose of this function is to serve as a backwards-comparison check for XLALDopplerFstatMet...
int XLALScaleOldDopplerMetric(OldDopplerMetric *m, REAL8 scale)
Scale all (existing) matrices, error-estimates and 'rho2' by 'scale'.
void XLALDestroyMultiPhaseDerivs(MultiPhaseDerivs *mdPhi)
int computePhaseMetric(gsl_matrix *g_ij, const PhaseDerivs *dphi, const REAL8Vector *GLweights)
int computeFstatMetric(gsl_matrix *gF_ij, gsl_matrix *gFav_ij, gsl_matrix *m1_ij, gsl_matrix *m2_ij, gsl_matrix *m3_ij, ConfigVariables *cfg)
int InitCode(ConfigVariables *cfg, const DopplerMetricParams *metricParams, const EphemerisData *edat)
basic initializations: set-up 'ConfigVariables' Taken from FstatMetric where it parsed user-input int...
REAL8 quad_form(const gsl_matrix *mat, const gsl_vector *vec)
int XLALAddOldDopplerMetric(OldDopplerMetric **metric1, const OldDopplerMetric *metric2)
Add 'metric2' to 'metric1', by adding the matrixes and 'rho2', and adding error-estimates in quadratu...
MultiPhaseDerivs * getMultiPhaseDerivs(const MultiDetectorStateSeries *detStates, const DopplerPoint *dopplerPoint, PhaseType_t type)
calculate the phase-derivatives for the time-series detStates and the given doppler-point.
void XLALDestroyOldDopplerMetric(OldDopplerMetric *metric)
Free a OldDopplerMetric structure.
#define SCALAR(u, v)
Simple Euklidean scalar product for two 3-dim vectors in cartesian coords.
int project_metric(gsl_matrix *ret_ij, gsl_matrix *g_ij, const UINT4 coordinate)
Calculate the projected metric onto the subspace of 'c' given by ret_ij = g_ij - ( g_ic * g_jc / g_cc...
void getPtolePosVel(PosVel_t *posvel, REAL8 tGPS, REAL8 tAutumn)
Get Ptolemaic position and velocity at time tGPS cut-down version of LALDTBaryPtolemaic()
@ OLDMETRIC_TYPE_PHASE
compute phase metric only
@ OLDMETRIC_TYPE_FSTAT
compute full F-metric only
@ OLDMETRIC_TYPE_ALL
compute both F-metric and phase-metric
This structure contains the per-SFT (weighted) antenna-pattern functions , with the SFT-index,...
REAL4Vector * b
(weighted) per-SFT antenna-pattern function
REAL4Vector * a
(weighted) per-SFT antenna-pattern function
Configuration settings required for and defining a coherent pulsar search.
MultiPhaseDerivs * multidPhi
Phase-derivatives d_i phi(t)
REAL8Vector * GLweights
Gauss-Legendre Integration-weights.
REAL8 Al3
amplitude factors alpha1, alpha2, alpha3
REAL8 refTime
reference time for pulsar phase definition
DopplerPoint dopplerPoint
sky-position and spins
MultiAMCoeffs * multiAMcoe
Amplitude Modulation coefficients a,b(t)
LIGOTimeGPS refTime
reference time for spin-parameters
MultiDetectorStateSeries * multiDetStates
multi-detector state series covering observation time
const EphemerisData * edat
ephemeris data (from XLALInitBarycenter())
MultiNoiseWeights * multiNoiseWeights
per-detector noise weights SX^-1/S^-1, no per-SFT variation (can be NULL for unit weights)
LIGOTimeGPS startTime
starting timestamp of SFTs
EphemerisData * edat
ephemeris data
EarthState earthState
EarthState information.
REAL8 rDetector[3]
Cartesian coords of detector position in ICRS J2000.
LIGOTimeGPS tGPS
GPS timestamps corresponding to this entry.
Timeseries of DetectorState's, representing the detector-info at different timestamps.
DetectorState * data
array of DetectorState entries
UINT4 length
total number of entries
type describing a Doppler coordinate system: lists the number of dimensions and the symbolic names of...
DopplerCoordinateID coordIDs[DOPPLERMETRIC_MAX_DIM]
coordinate 'names'
UINT4 dim
number of dimensions covered
meta-info specifying a Doppler-metric
MultiLALDetector multiIFO
detectors to compute metric for
DetectorMotionType detMotionType
the type of detector-motion assumed: full spin+orbit, pure orbital, Ptole, ...
PulsarParams signalParams
parameter-space point to compute metric for (doppler + amplitudes)
LALSegList segmentList
segment list: Nseg segments of the form (startGPS endGPS numSFTs)
MultiNoiseFloor multiNoiseFloor
and associated per-detector noise-floors to be used for weighting.
DopplerCoordinateSystem coordSys
number of dimensions and coordinate-IDs of Doppler-metric
a 'point' in the "Doppler parameter space" {alpha, delta, fkdot }
REAL8 posNow[3]
Cartesian coords of Earth's center at tgps, extrapolated from JPL DE405 ephemeris; units= sec.
This structure contains all information about the center-of-mass positions of the Earth and Sun,...
A vector of 'timestamps' of type LIGOTimeGPS.
LIGOTimeGPS * data
array of timestamps
Multi-IFO container for antenna-pattern coefficients and atenna-pattern matrix .
UINT4 length
number of IFOs
AMCoeffs ** data
noise-weighted AM-coeffs , and
Multi-IFO time-series of DetectorStates.
UINT4 length
number of detectors
DetectorStateSeries ** data
vector of pointers to DetectorStateSeries
UINT4 length
number of detectors
LALDetector sites[PULSAR_MAX_DETECTORS]
array of site information
REAL8 sqrtSn[PULSAR_MAX_DETECTORS]
per-IFO sqrt(PSD) values , where
One noise-weight (number) per SFT (therefore indexed over IFOs and SFTs.
UINT4 length
number of detectors
REAL8Vector ** data
weights-vector for each detector
PhaseDerivs ** data
phase-derivs array
UINT4 length
number of IFOs
double maxrelerr_gPh
estimate for largest relative error in phase-metric component integrations
gsl_matrix * g_ij
symmetric matrix holding the phase-metric, averaged over segments
DopplerMetricParams meta
"meta-info" describing/specifying the type of Doppler metric
gsl_matrix * g_ij_seg
the phase-metric for each segment, concatenated by column: [g_ij_1, g_ij_2, ...]
gsl_matrix * gFav_ij
'average' Fstat-metric
gsl_matrix * gF_ij
full F-statistic metric gF_ij, including antenna-pattern effects (see )
double maxrelerr_gF
estimate for largest relative error in Fmetric component integrations
gsl_matrix * Fisher_ab
Full 4+n dimensional Fisher matrix, ie amplitude + Doppler space.
REAL8 rho2
signal SNR rho^2 = A^mu M_mu_nu A^nu
REAL8 aCross
Signal amplitude (cross)
REAL8 psi
polarization angle psi
REAL8 aPlus
Signal amplitude (plus)
PulsarSpins fkdot
Intrinsic spins: [Freq, f1dot, f2dot, ... ] where fkdot = d^kFreq/dt^k.
REAL8 Delta
Sky position: DEC (latitude) in equatorial coords and radians.
LIGOTimeGPS refTime
Reference time of pulsar parameters (in SSB!)
REAL8 Alpha
Sky position: RA (longitude) in equatorial coords and radians.
PulsarAmplitudeParams Amp
'Amplitude-parameters': h0, cosi, phi0, psi
PulsarDopplerParams Doppler
'Phase-evolution parameters': {skypos, fkdot, orbital params }