Commit bd18cbe0 authored by David Keitel's avatar David Keitel

HSGCT: avoid -Inf for log10BSGLtL, log10BtSGLtL

 -exactly like already done for log10BSGL
 -refs #5239
Original: d6579c94b699fba787b3944ce11a88a766ba2d1e
parent e5e32ec5
......@@ -2704,7 +2704,6 @@ void UpdateSemiCohToplistsOptimTriple ( LALStatus *status,
XLALPrintError ("%s line %d : XLALComputeBSGL() failed with xlalErrno = %d.\n\n", __func__, __LINE__, xlalErrno );
ABORT ( status, HIERARCHICALSEARCH_EXLAL, HIERARCHICALSEARCH_MSGEXLAL );
}
if ( unlikely(line.log10BSGL < -LAL_REAL4_MAX*0.1) ) {
line.log10BSGL = -LAL_REAL4_MAX*0.1; /* avoid minimum value, needed for output checking in print_gctFstatline_to_str() */
}
......@@ -2714,12 +2713,18 @@ void UpdateSemiCohToplistsOptimTriple ( LALStatus *status,
XLALPrintError ("%s line %d : XLALComputeBSGLtL() failed with xlalErrno = %d.\n\n", __func__, __LINE__, xlalErrno );
ABORT ( status, HIERARCHICALSEARCH_EXLAL, HIERARCHICALSEARCH_MSGEXLAL );
}
if ( unlikely(line.log10BSGLtL < -LAL_REAL4_MAX*0.1) ) {
line.log10BSGLtL = -LAL_REAL4_MAX*0.1; /* avoid minimum value, needed for output checking in print_gctFstatline_to_str() */
}
line.log10BtSGLtL = XLALComputeBtSGLtL ( line.maxTwoFl, sumTwoFX, line.maxTwoFXl, usefulparams->BSGLsetup );
if ( unlikely(xlalErrno != 0) ) {
XLALPrintError ("%s line %d : XLALComputeBSGLtL() failed with xlalErrno = %d.\n\n", __func__, __LINE__, xlalErrno );
ABORT ( status, HIERARCHICALSEARCH_EXLAL, HIERARCHICALSEARCH_MSGEXLAL );
}
if ( unlikely(line.log10BtSGLtL < -LAL_REAL4_MAX*0.1) ) {
line.log10BtSGLtL = -LAL_REAL4_MAX*0.1; /* avoid minimum value, needed for output checking in print_gctFstatline_to_str() */
}
line.Freq = freq_fg; /* NOTE: this is not the final output frequency! For performance reasons, it will only later get correctly extrapolated for the final toplist */
line.Alpha = in->alpha;
......@@ -2879,16 +2884,24 @@ void UpdateSemiCohToplists ( LALStatus *status,
line.maxTwoFXl[X] = in->maxTwoFXl[FG_FX_INDEX(*in, X, ifreq_fg)];
line.maxTwoFXlSeg[X] = in->maxTwoFXlIdx[FG_FX_INDEX(*in, X, ifreq_fg)];
}
line.log10BSGLtL = XLALComputeBSGLtL ( sumTwoF, sumTwoFX, line.maxTwoFXl, usefulparams->BSGLsetup );
if ( xlalErrno != 0 ) {
XLALPrintError ("%s line %d : XLALComputeBSGLtL() failed with xlalErrno = %d.\n\n", __func__, __LINE__, xlalErrno );
ABORT ( status, HIERARCHICALSEARCH_EXLAL, HIERARCHICALSEARCH_MSGEXLAL );
}
if ( line.log10BSGLtL < -LAL_REAL4_MAX*0.1 ) {
line.log10BSGLtL = -LAL_REAL4_MAX*0.1; /* avoid minimum value, needed for output checking in print_gctFstatline_to_str() */
}
line.log10BtSGLtL = XLALComputeBtSGLtL ( line.maxTwoFl, sumTwoFX, line.maxTwoFXl, usefulparams->BSGLsetup );
if ( xlalErrno != 0 ) {
XLALPrintError ("%s line %d : XLALComputeBtSGLtL() failed with xlalErrno = %d.\n\n", __func__, __LINE__, xlalErrno );
ABORT ( status, HIERARCHICALSEARCH_EXLAL, HIERARCHICALSEARCH_MSGEXLAL );
}
if ( line.log10BtSGLtL < -LAL_REAL4_MAX*0.1 ) {
line.log10BtSGLtL = -LAL_REAL4_MAX*0.1; /* avoid minimum value, needed for output checking in print_gctFstatline_to_str() */
}
}
......
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