Commit e48dba36 authored by David Keitel's avatar David Keitel Committed by Reinhard Prix

XLALComputeTransientFstatMap: avoid F=-nan for Dd=0

 -same trick as in XLALWeightMultiAMCoeffs()
 -fixes #5477
Original: 1880d31edde0535d7325562cbfd0277cee4dee21
parent 86ee450a
......@@ -822,7 +822,11 @@ XLALComputeTransientFstatMap ( const MultiFstatAtomVector *multiFstatAtoms, /**
/* generic F-stat calculation from A,B,C, Fa, Fb */
REAL4 DdInv = 1.0f / ( Ad * Bd - Cd * Cd );
REAL4 Dd = ( Ad * Bd - Cd * Cd );
REAL4 DdInv = 0;
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);
......
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