Commit b26d1c74 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Forces output of Fstat to be finite and non-nan

It seems that , due to the choice of transient windows, occasionally
the calculated Fstat is +/- inf or a nan. This behaviour is not
understood. To address this, we apply a simple check and if it is an
undesirable value, return 0. This will inherently bias the chains away
from regions of parameter space in which the output breaks.
parent b9bb2f47
......@@ -374,7 +374,10 @@ class SemiCoherentGlitchSearch(BaseSearchClass, ComputeFstat):
theta_i_at_tref[3], Alpha, Delta)
twoFSum += twoFVal
return twoFSum
if np.isfinite(twoFSum):
return twoFSum
else:
return 0
def compute_glitch_fstat_single(self, F0, F1, F2, Alpha, Delta, delta_F0,
delta_F1, tglitch):
......
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