Commit da7cbddd authored by David Keitel's avatar David Keitel

get_fullycoherent_twoF: in transient-search case, return max2F over (t0,tau) grid

parent 5ec0b49d
......@@ -684,8 +684,8 @@ class ComputeFstat(BaseSearchClass):
FS = lalpulsar.ComputeTransientFstatMap(
self.FstatResults.multiFatoms[0], self.windowRange, False)
twoF = 2*np.max(FS.F_mn.data)
if self.BSGL is False:
twoF = 2*FS.F_mn.data[0][0]
if np.isnan(twoF):
return 0
else:
......@@ -700,10 +700,17 @@ class ComputeFstat(BaseSearchClass):
FS1 = lalpulsar.ComputeTransientFstatMap(
FstatResults_single.multiFatoms[0], self.windowRange, False)
self.twoFX[0] = 2*FS0.F_mn.data[0][0]
self.twoFX[1] = 2*FS1.F_mn.data[0][0]
# for now, use the Doppler parameter with
# multi-detector F maximised over t0,tau
# to return BSGL
# FIXME: should we instead compute BSGL over the whole F_mn
# and return the maximum of that?
idx_maxTwoF = np.argmax(FS.F_mn.data)
self.twoFX[0] = 2*FS0.F_mn.data[idx_maxTwoF]
self.twoFX[1] = 2*FS1.F_mn.data[idx_maxTwoF]
log10_BSGL = lalpulsar.ComputeBSGL(
2*FS.F_mn.data[0][0], self.twoFX, self.BSGLSetup)
twoF, self.twoFX, self.BSGLSetup)
return log10_BSGL/np.log10(np.exp(1))
......
  • David Keitel
    @dkeitel started a thread
    • @GregAshton does this look right to you? In use cases like MCMC where there's only a single point the max() should still safely fall back to that value, so no extra catch clauses needed, I think.

    Please register or sign in to reply
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