Tests for exported functions in UniversalDopplerMetric. More...
Prototypes | |
static int | test_XLALComputeOrbitalDerivatives (void) |
Unit test function for XLALComputeOrbitalDerivatives() More... | |
static int | test_XLALComputeDopplerMetrics (void) |
Unit test for metric functions XLALComputeDopplerPhaseMetric() and XLALComputeDopplerFstatMetric() More... | |
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 XLALDopplerFstatMetric(). More... | |
void | XLALDestroyOldDopplerMetric (OldDopplerMetric *metric) |
Free a OldDopplerMetric structure. More... | |
int | XLALAddOldDopplerMetric (OldDopplerMetric **metric1, const OldDopplerMetric *metric2) |
Add 'metric2' to 'metric1', by adding the matrixes and 'rho2', and adding error-estimates in quadrature. More... | |
int | XLALScaleOldDopplerMetric (OldDopplerMetric *m, REAL8 scale) |
Scale all (existing) matrices, error-estimates and 'rho2' by 'scale'. More... | |
int | main (void) |
MAIN function: calls a number of unit-tests. More... | |
Tests for exported functions in UniversalDopplerMetric.
Definition in file UniversalDopplerMetricTest.c.
Go to the source code of this file.
Data Structures | |
struct | OldDopplerMetric |
Macros | |
#define | COPY_VECT(dst, src) do { (dst)[0] = (src)[0]; (dst)[1] = (src)[1]; (dst)[2] = (src)[2]; } while(0) |
#define | NORM(v) ( sqrt ( (v)[0]*(v)[0] + (v)[1]*(v)[1] + (v)[2]*(v)[2] ) ) |
#define | DIV_VECT(dst, src, div) do { (dst)[0] = (src)[0]/(div); (dst)[1] = (src)[1]/(div); (dst)[2] = (src)[2]/(div); } while(0) |
#define | SUB_VECT(dst, src) do { (dst)[0] -= (src)[0]; (dst)[1] -= (src)[1]; (dst)[2] -= (src)[2]; } while(0) |
#define | MULT_VECT(v, lam) do{ (v)[0] *= (lam); (v)[1] *= (lam); (v)[2] *= (lam); } while(0) |
Enumerations | |
enum | OldMetricType_t { OLDMETRIC_TYPE_PHASE = 0 , OLDMETRIC_TYPE_FSTAT = 1 , OLDMETRIC_TYPE_ALL = 2 , OLDMETRIC_TYPE_LAST , OLDMETRIC_TYPE_PHASE = 0 , OLDMETRIC_TYPE_FSTAT = 1 , OLDMETRIC_TYPE_ALL = 2 , OLDMETRIC_TYPE_LAST } |
#define COPY_VECT | ( | dst, | |
src | |||
) | do { (dst)[0] = (src)[0]; (dst)[1] = (src)[1]; (dst)[2] = (src)[2]; } while(0) |
Definition at line 51 of file UniversalDopplerMetricTest.c.
#define NORM | ( | v | ) | ( sqrt ( (v)[0]*(v)[0] + (v)[1]*(v)[1] + (v)[2]*(v)[2] ) ) |
Definition at line 53 of file UniversalDopplerMetricTest.c.
#define DIV_VECT | ( | dst, | |
src, | |||
div | |||
) | do { (dst)[0] = (src)[0]/(div); (dst)[1] = (src)[1]/(div); (dst)[2] = (src)[2]/(div); } while(0) |
Definition at line 55 of file UniversalDopplerMetricTest.c.
#define SUB_VECT | ( | dst, | |
src | |||
) | do { (dst)[0] -= (src)[0]; (dst)[1] -= (src)[1]; (dst)[2] -= (src)[2]; } while(0) |
Definition at line 56 of file UniversalDopplerMetricTest.c.
#define MULT_VECT | ( | v, | |
lam | |||
) | do{ (v)[0] *= (lam); (v)[1] *= (lam); (v)[2] *= (lam); } while(0) |
Definition at line 57 of file UniversalDopplerMetricTest.c.
enum OldMetricType_t |
Definition at line 63 of file UniversalDopplerMetricTest.c.
|
static |
Unit test function for XLALComputeOrbitalDerivatives()
Definition at line 528 of file UniversalDopplerMetricTest.c.
|
static |
Unit test for metric functions XLALComputeDopplerPhaseMetric() and XLALComputeDopplerFstatMetric()
Initially modelled afer testMetricCodes.py script: Check metric codes 'getMetric' 'FstatMetric' and 'FstatMetric_v2' by comparing them against each other. Given that they represent 3 very different implementations of metric calculations, this provides a very powerful consistency test
Definition at line 132 of file UniversalDopplerMetricTest.c.
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 XLALDopplerFstatMetric().
This is why it has been moved into the test-directory
This is basically a wrapper of the 'main()' function from the old standalone 'lalapps_FstatMetric' code, providing an API compatible with XLALDopplerFstatMetric().
metricType | type of metric to compute |
metricParams | input parameters determining the metric calculation |
edat | ephemeris data |
Definition at line 187 of file old-FstatMetric.c.
void XLALDestroyOldDopplerMetric | ( | OldDopplerMetric * | metric | ) |
Free a OldDopplerMetric structure.
Definition at line 254 of file old-FstatMetric.c.
int XLALAddOldDopplerMetric | ( | OldDopplerMetric ** | metric1, |
const OldDopplerMetric * | metric2 | ||
) |
Add 'metric2' to 'metric1', by adding the matrixes and 'rho2', and adding error-estimates in quadrature.
Note1: if the 'metric1 == NULL', then it is initialized to the values in 'metric2'. The elements are *copied and the result is allocated here.
Note2: the 'meta' field-information of 'metric2' is simply copied into the output, meta-info consistency is not checked.
Definition at line 299 of file old-FstatMetric.c.
int XLALScaleOldDopplerMetric | ( | OldDopplerMetric * | m, |
REAL8 | scale | ||
) |
Scale all (existing) matrices, error-estimates and 'rho2' by 'scale'.
Definition at line 378 of file old-FstatMetric.c.
int main | ( | void | ) |
MAIN function: calls a number of unit-tests.
Definition at line 101 of file UniversalDopplerMetricTest.c.