Commit da7cbddd authored by David Keitel's avatar David Keitel
Browse files

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(
if self.BSGL is False:
twoF = 2*[0][0]
if np.isnan(twoF):
return 0
......@@ -700,10 +700,17 @@ class ComputeFstat(BaseSearchClass):
FS1 = lalpulsar.ComputeTransientFstatMap(
FstatResults_single.multiFatoms[0], self.windowRange, False)
self.twoFX[0] = 2*[0][0]
self.twoFX[1] = 2*[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(
self.twoFX[0] = 2*[idx_maxTwoF]
self.twoFX[1] = 2*[idx_maxTwoF]
log10_BSGL = lalpulsar.ComputeBSGL(
2*[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
Supports Markdown
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