Commit 956f6fec authored by David Keitel's avatar David Keitel Committed by Reinhard Prix

XLALComputeTransientFstatMap: use XLALComputeFstatFromFaFb instead of copied code

 -was copied over in 24dad9754a1 (Redmine #1954)
  presumably because of export/include issues
 -since 818975ac0fb (Redmine #2001)
  the need for that should have vanished
 -refs #5477
Original: d69a1efc450da54aeb46feb354a9393932dfec8c
parent e48dba36
......@@ -41,10 +41,9 @@
#include <lal/ProbabilityDensity.h>
#include <lal/TransientCW_utils.h>
#include "ComputeFstat_internal.h"
/* ----- MACRO definitions ---------- */
#define SQ(x) ((x)*(x))
/* ----- module-local fast lookup-table handling of negative exponentials ----- */
/**
......@@ -827,19 +826,8 @@ XLALComputeTransientFstatMap ( const MultiFstatAtomVector *multiFstatAtoms, /**
if ( Dd > 0 ) { /* safety catch as in XLALWeightMultiAMCoeffs(): make it so that in the end F=0 instead of -nan */
DdInv = 1.0f / Dd;
}
REAL4 F;
{ // function body copied from XLALComputeFstatFromFaFb()
REAL4 Fa_re = creal(Fa);
REAL4 Fa_im = cimag(Fa);
REAL4 Fb_re = creal(Fb);
REAL4 Fb_im = cimag(Fb);
F = DdInv * ( Bd * ( SQ(Fa_re) + SQ(Fa_im) )
+ Ad * ( SQ(Fb_re) + SQ(Fb_im) )
- 2.0 * Cd * ( Fa_re * Fb_re + Fa_im * Fb_im )
);
}
REAL4 twoF = XLALComputeFstatFromFaFb ( Fa, Fb, Ad, Bd, Cd, 0, DdInv );
REAL4 F = 0.5 * twoF;
/* keep track of loudest F-stat value encountered over the m x n matrix */
if ( F > ret->maxF )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment