From 1b428b81199935010f9ca98056c2870ec96d2368 Mon Sep 17 00:00:00 2001 From: Jeremy Baier Date: Fri, 6 Dec 2024 21:41:32 -0800 Subject: [PATCH] dropping a commit before i probably mess things --- hasasia/skymap.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hasasia/skymap.py b/hasasia/skymap.py index e87370d..311faa2 100644 --- a/hasasia/skymap.py +++ b/hasasia/skymap.py @@ -386,6 +386,7 @@ def _fdp_angle_averaged(self, F_thresh, h0, fidx): ''' The angle-averaged false dismissal probablity. See arXiv.... ''' + snr = self.SNR(h0,0,0,fidx) integrand = lambda psi, iota: np.sin(iota)/np.pi*ss.ncx2.cdf(2*F_thresh, df=4, nc=self.SNR(h0,iota,psi,fidx).mean()**2) return si.dblquad(integrand,0,np.pi,-np.pi/4,np.pi/4)[0] @@ -395,7 +396,7 @@ def _solve_F_given_fap(self, fap0=0.003, Npsrs=None): def _solve_F_given_fdp_snr(self, fdp0=0.05, snr=3, Npsrs=None, iota_psi_ave=False): Npsrs = 1 if Npsrs is None else Npsrs - F0 = (4*Npsrs+snr**2)/2 + F0 = (4*Npsrs+snr**2)/2 return sopt.fsolve(lambda F :self.false_dismissal_prob(F, snr, Npsrs=Npsrs, iota_psi_ave=iota_psi_ave)-fdp0, F0) def _solve_snr_given_fdp_F(self, fdp0=0.05, F=3, Npsrs=None, iota_psi_ave=False):