Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALPulsar 7.1.1.1-b246709
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
LineRobustStatsTest.c File Reference

Prototypes

int XLALCompareBSGLComputations (const REAL4 TwoF, const UINT4 numDetectors, const REAL4Vector *TwoFX, const REAL4 cohFstar0, const REAL4 *oLtLGX, const UINT4 numSegs, const REAL4 tolerance, const LRstat_variant_t LRstat_variant, const REAL4 maxTwoF, const REAL4Vector *maxTwoFX)
 Test function to compute BSGL values from XLALComputeBSGL against those recomputed from scratch ("pedestrian" formula); compare the results and exit if tolerance is violated. More...
 
REAL4 XLALComputePedestrianLRStat (const REAL4 TwoF, const UINT4 numDetectors, const REAL4Vector *TwoFX, const REAL4 cohFstar0, const REAL4 *oLtLGX, const BOOLEAN useLogCorrection, const LRstat_variant_t LRstat_variant, const REAL4 maxTwoF, const REAL4Vector *maxTwoFX, const UINT4 numSegs)
 compute BSGL "the pedestrian way", from Eq. More...
 
int XLALCheckBSGLDifferences (const REAL4 diff, const REAL4 tolerance, const CHAR *casestring)
 
int XLALCheckBSGLVectorFunctions (void)
 
int main (int argc, char *argv[])
 

Go to the source code of this file.

Macros

#define TRUE   (1==1)
 
#define FALSE   (1==0)
 
#define VEC_LEN   5
 
#define NUM_SEGS   3
 

Enumerations

enum  LRstat_variant_t { LRS_BSGL = 0 , LRS_BSGLtL = 1 , LRS_BtSGLtL = 2 , LRS_BStSGLtL = 3 }
 Enum for LR-statistic variants. More...
 

Macro Definition Documentation

◆ TRUE

#define TRUE   (1==1)

Definition at line 31 of file LineRobustStatsTest.c.

◆ FALSE

#define FALSE   (1==0)

Definition at line 32 of file LineRobustStatsTest.c.

◆ VEC_LEN

#define VEC_LEN   5

◆ NUM_SEGS

#define NUM_SEGS   3

Enumeration Type Documentation

◆ LRstat_variant_t

Enum for LR-statistic variants.

Enumerator
LRS_BSGL 
LRS_BSGLtL 
LRS_BtSGLtL 
LRS_BStSGLtL 

Definition at line 37 of file LineRobustStatsTest.c.

Function Documentation

◆ XLALCompareBSGLComputations()

int XLALCompareBSGLComputations ( const REAL4  TwoF,
const UINT4  numDetectors,
const REAL4Vector TwoFX,
const REAL4  cohFstar0,
const REAL4 oLtLGX,
const UINT4  numSegs,
const REAL4  tolerance,
const LRstat_variant_t  LRstat_variant,
const REAL4  maxTwoF,
const REAL4Vector maxTwoFX 
)

Test function to compute BSGL values from XLALComputeBSGL against those recomputed from scratch ("pedestrian" formula); compare the results and exit if tolerance is violated.

Parameters
TwoFmulti-detector Fstat
numDetectorsnumber of detectors
TwoFXvector of single-detector Fstats
cohFstar0amplitude prior normalization for lines
oLtLGXarray of single-detector prior line odds ratio, can be NULL
numSegsnumber of segments
tolerancetolerance for comparisons
LRstat_variantwhich statistic variant to use
maxTwoFmulti-detector maximum Fstat over segments
maxTwoFXvector of single-detector maximum Fstats over segments

Definition at line 199 of file LineRobustStatsTest.c.

◆ XLALComputePedestrianLRStat()

REAL4 XLALComputePedestrianLRStat ( const REAL4  TwoF,
const UINT4  numDetectors,
const REAL4Vector TwoFX,
const REAL4  cohFstar0,
const REAL4 oLtLGX,
const BOOLEAN  useLogCorrection,
const LRstat_variant_t  LRstat_variant,
const REAL4  maxTwoF,
const REAL4Vector maxTwoFX,
const UINT4  numSegs 
)

compute BSGL "the pedestrian way", from Eq.

(40) of Keitel, Prix, Papa, Leaci, Siddiqi, PR D 89, 064023 (2014), explicit formula for numDet=2: log10 BSGL = F - log ( e^F* + e^{F1}*oLtLG1/oLtLG + e^{F2}*oLtLG2/oLtLG )

Parameters
TwoFmulti-detector Fstat
numDetectorsnumber of detectors
TwoFXvector of single-detector Fstats
cohFstar0amplitude prior normalization for lines
oLtLGXarray of single-detector prior line odds ratio, can be NULL (in most general case includes both L and tL)
useLogCorrectioninclude log-term correction or not
LRstat_variantwhich statistic variant to compute
maxTwoFmulti-detector maximum Fstat over segments
maxTwoFXvector of single-detector maximum Fstats over segments
numSegsnumber of segments

Definition at line 297 of file LineRobustStatsTest.c.

◆ XLALCheckBSGLDifferences()

int XLALCheckBSGLDifferences ( const REAL4  diff,
const REAL4  tolerance,
const CHAR casestring 
)

Definition at line 386 of file LineRobustStatsTest.c.

◆ XLALCheckBSGLVectorFunctions()

int XLALCheckBSGLVectorFunctions ( void  )

Definition at line 405 of file LineRobustStatsTest.c.

◆ main()

int main ( int  argc,
char argv[] 
)

Definition at line 83 of file LineRobustStatsTest.c.