24#include <lal/MetricUtils.h>
25#include <lal/XLALError.h>
26#include <lal/UniversalDopplerMetric.h>
27#include <lal/LALInitBarycenter.h>
29#include <lal/GSLHelpers.h>
35 gsl_matrix *g_ij = NULL;
39 char earthEphem[] = TEST_PKG_DATA_DIR
"earth00-40-DE405.dat.gz";
40 char sunEphem[] = TEST_PKG_DATA_DIR
"sun00-40-DE405.dat.gz";
49 par.coordSys = coordSys;
62 par.signalParams.Doppler.fkdot[0] = 100;
63 par.projectCoord = -1;
79 fprintf( stderr,
"\n=== Test XLALMetricEllipseBoundingBox() ===\n\n" );
83 GPVEC( bbox,
"%0.6g" );
84 const double bbox_0 = 0.148608;
85 XLAL_CHECK_MAIN( fabs( gsl_vector_get( bbox, 0 ) - bbox_0 ) <= 1
e-5,
XLAL_ETOL,
"gsl_vector_get( bbox, 0 ) = %0.6g != %0.6g", gsl_vector_get( bbox, 0 ), bbox_0 );
90 fprintf( stderr,
"\n=== Test XLALTransformMetric() and XLALInverseTransformMetric() ===\n\n" );
94 gsl_matrix *GAMAT_MAIN( transform, g_ij->size1, g_ij->size2 );
95 gsl_matrix *GAMAT_MAIN( gpr_ij, g_ij->size1, g_ij->size2 );
98 for (
size_t i = 0;
i < transform->size1; ++
i ) {
99 for (
size_t j = 0;
j < transform->size2; ++
j ) {
100 gsl_matrix_set( transform,
i,
j, (
j >=
i ) ? pow( 2,
j -
i ) : 0.0 );
111 GFMAT( transform, gpr_ij );
115 fprintf( stderr,
"\n=== Test XLALDiagNormalizeMetric() ===\n\n" );
117 gsl_matrix *transform = NULL, *gpr_ij = NULL;
121 for (
size_t i = 0;
i < gpr_ij->size1; ++
i ) {
122 XLAL_CHECK_MAIN( fabs( gsl_matrix_get( gpr_ij,
i,
i ) - 1.0 ) <= 1
e-5,
XLAL_ETOL,
"gsl_matrix_get( gpr_ij, %zu, %zu ) = %0.6g != 1.0",
i,
i, gsl_matrix_get( gpr_ij,
i,
i ) );
131 GFMAT( transform, gpr_ij );
void LALCheckMemoryLeaks(void)
int XLALParseMultiLALDetector(MultiLALDetector *detInfo, const LALStringVector *detNames)
Parse string-vectors (typically input by user) of N detector-names for detectors ,...
int XLALParseMultiNoiseFloor(MultiNoiseFloor *multiNoiseFloor, const LALStringVector *sqrtSX, UINT4 numDetectors)
Parse string-vectors (typically input by user) of N detector noise-floors for detectors ,...
EphemerisData * XLALInitBarycenter(const CHAR *earthEphemerisFile, const CHAR *sunEphemerisFile)
XLAL interface to reading ephemeris files 'earth' and 'sun', and return ephemeris-data in old backwar...
void XLALDestroyEphemerisData(EphemerisData *edat)
Destructor for EphemerisData struct, NULL robust.
#define XLAL_INIT_DECL(var,...)
REAL8 XLALCompareMetrics(const gsl_matrix *g1_ij, const gsl_matrix *g2_ij)
Flexible comparison function between two metrics and .
int XLALInverseTransformMetric(gsl_matrix **p_gpr_ij, const gsl_matrix *transform, const gsl_matrix *g_ij)
Apply the inverse of a transform to a metric such that , or equivalently .
int XLALDiagNormalizeMetric(gsl_matrix **p_gpr_ij, gsl_matrix **p_transform, const gsl_matrix *g_ij)
Diagonally-normalize a metric .
int XLALTransformMetric(gsl_matrix **p_gpr_ij, const gsl_matrix *transform, const gsl_matrix *g_ij)
Apply a transform to a metric such that , or equivalently .
gsl_vector * XLALMetricEllipseBoundingBox(const gsl_matrix *g_ij, const double max_mismatch)
Compute the extent of the bounding box of the mismatch ellipse of a metric .
int XLALSegListClear(LALSegList *seglist)
int XLALSegListInitSimpleSegments(LALSegList *seglist, LIGOTimeGPS startTime, UINT4 Nseg, REAL8 Tseg)
void XLALDestroyStringVector(LALStringVector *vect)
LALStringVector * XLALCreateStringVector(const CHAR *str1,...)
void XLALDestroyDopplerPhaseMetric(DopplerPhaseMetric *metric)
Free a DopplerPhaseMetric structure.
DopplerPhaseMetric * XLALComputeDopplerPhaseMetric(const DopplerMetricParams *metricParams, const EphemerisData *edat)
Calculate an approximate "phase-metric" with the specified parameters.
@ DOPPLERCOORD_N3X_EQU
X component of unconstrained super-sky position in equatorial coordinates [Units: none].
@ DOPPLERCOORD_N3Z_EQU
Z component of unconstrained super-sky position in equatorial coordinates [Units: none].
@ DOPPLERCOORD_N3Y_EQU
Y component of unconstrained super-sky position in equatorial coordinates [Units: none].
@ DOPPLERCOORD_F1DOT
First spindown [Units: Hz/s].
@ DOPPLERCOORD_FREQ
Frequency [Units: Hz].
@ DETMOTION_SPIN
Full spin motion.
@ DETMOTION_ORBIT
Ephemeris-based orbital motion.
#define XLAL_CHECK_MAIN(assertion,...)
type describing a Doppler coordinate system: lists the number of dimensions and the symbolic names of...
meta-info specifying a Doppler-metric
Struct to hold the output of XLALComputeDopplerPhaseMetric(), including meta-info on the number of di...
This structure contains all information about the center-of-mass positions of the Earth and Sun,...