29#include <lal/UserInput.h>
30#include <lal/LALConstants.h>
31#include <lal/PulsarDataTypes.h>
32#include <lal/LFTandTSutils.h>
33#include <lal/LALPulsarVCSInfo.h>
73main(
int argc,
char *argv[] )
92 tol.relErr_L1 = uvar.tol_L1;
93 tol.relErr_L2 = uvar.tol_L2;
94 tol.angleV = uvar.tol_angle;
95 tol.relErr_atMaxAbsx = uvar.tol_atMax;
96 tol.relErr_atMaxAbsy = uvar.tol_atMax;
130 XLALRegisterUvarMember( tol_atMax,
REAL8, 0, OPTIONAL,
"tolerance on single-sample relative error *at* respective maximum, between [0,2]" );
147 XLAL_CHECK(
f1->lines->nTokens ==
f2->lines->nTokens,
XLAL_ETOL,
"Different number of lines: %d != %d\n",
f1->lines->nTokens,
f2->lines->nTokens );
148 UINT4 nlines =
f1->lines->nTokens;
154 for (
UINT4 i = 0;
i < nlines ;
i++ ) {
155 const char *line1 =
f1->lines->tokens[
i];
156 const char *line2 =
f2->lines->tokens[
i];
164 if ( ( relErr =
relError( parsed1.Freq, parsed2.Freq ) ) > tol_param ) {
165 XLAL_ERROR(
XLAL_ETOL,
"Relative frequency-error %g exceeds %g in line %d\n", relErr, tol_param,
i + 1 );
167 if ( ( relErr =
relError( parsed1.Alpha, parsed2.Alpha ) ) > tol_param ) {
168 XLAL_ERROR(
XLAL_ETOL,
"Relative error %g in alpha exceeds %g in line %d\n", relErr, tol_param,
i + 1 );
170 if ( ( relErr =
relError( parsed1.Delta, parsed2.Delta ) ) > tol_param ) {
171 XLAL_ERROR(
XLAL_ETOL,
"Relative error %g in delta exceeds %g in line %d\n", relErr, tol_param,
i + 1 );
173 if ( ( relErr =
relError( parsed1.f1dot, parsed2.f1dot ) ) > tol_param ) {
174 XLAL_ERROR(
XLAL_ETOL,
"Relative error %g in f1dot exceeds %g in line %d\n", relErr, tol_param,
i + 1 );
176 if ( ( relErr =
relError( parsed1.f2dot, parsed2.f2dot ) ) > tol_param ) {
177 XLAL_ERROR(
XLAL_ETOL,
"Relative error %g in f2dot exceeds %g in line %d\n", relErr, tol_param,
i + 1 );
179 if ( ( relErr =
relError( parsed1.f3dot, parsed2.f3dot ) ) > tol_param ) {
180 XLAL_ERROR(
XLAL_ETOL,
"Relative error %g in f3dot exceeds %g in line %d\n", relErr, tol_param,
i + 1 );
214 int ret = sscanf(
line,
"%lf %lf %lf %lf %lf %lf %lf",
215 &
e[0], &
e[1], &
e[2], &
e[3], &
e[4], &
e[5], &
e[6] );
219 FstatLine->
Freq =
e[0];
227 FstatLine->
TwoF =
e[4];
228 FstatLine->
f2dot = 0;
229 FstatLine->
f3dot = 0;
233 FstatLine->
TwoF =
e[5];
234 FstatLine->
f3dot = 0;
239 FstatLine->
TwoF =
e[6];
256 return fabs( (
x -
y ) /
denom );
void LALCheckMemoryLeaks(void)
const LALVCSInfoList lalPulsarVCSInfoList
NULL-terminated list of VCS and build information for LALPulsar and its dependencies
const WeaveSearchTimingDenominator denom
int main(int argc, char *argv[])
int XLALinitUserVars(UserVariables_t *uvar)
int XLALParseFstatLine(FstatLine_t *FstatLine, const CHAR *line)
int XLALcompareFstatFiles(const LALParsedDataFile *f1, const LALParsedDataFile *f2, REAL8 tol_param, VectorComparison tol)
comparison specific to pure Fstat-output files (5 entries )
REAL8 relError(REAL8 x, REAL8 y)
int XLALParseDataFile(LALParsedDataFile **cfgdata, const CHAR *fname)
void XLALDestroyParsedDataFile(LALParsedDataFile *cfgdata)
#define XLAL_INIT_DECL(var,...)
int XLALCompareREAL4Vectors(VectorComparison *result, const REAL4Vector *x, const REAL4Vector *y, const VectorComparison *tol)
Compare two REAL4 vectors using various different comparison metrics.
REAL4Vector * XLALCreateREAL4Vector(UINT4 length)
void XLALDestroyREAL4Vector(REAL4Vector *vector)
#define XLAL_CHECK(assertion,...)
Struct holding the results of comparing two floating-point vectors (real-valued or complex),...