def Forecast_Cellrsx(self, ellBinEdges, fsky, option='None'): ellMids = old_div((ellBinEdges[1:] + ellBinEdges[:-1]), 2) cls_rsx = self.fgs.rs_cross(self.evalells,self.freq[0]) / self.cc.c['TCMBmuK']**2. \ / ((self.evalells+1.)*self.evalells) * 2.* np.pi cls_rsx = old_div(cls_rsx, (self.fgs.rs_nu( self.freq[0]))) # Normalized to get Cell^rsrs fiducial LF = LensForecast() if (option == 'None'): LF.loadGenericCls("rr", self.evalells, cls_rsx, self.evalells, self.N_ll_rsx) elif (option == 'NoILC'): LF.loadGenericCls("rr", self.evalells, cls_rsx, self.evalells, self.N_ll_noILC) else: return "Wrong option" sn, errs = LF.sn(ellBinEdges, fsky, "rr") # not squared cls_out = np.interp(ellMids, self.evalells, cls_rsx) return ellMids, cls_out, errs, sn
def Forecast_CellrsxEE(self, ellBinEdges, fsky, option='None'): ellMids = old_div((ellBinEdges[1:] + ellBinEdges[:-1]), 2) cls_rsxEE = self.fgs.rs_crossEE( self.evalells, self.fgs.nu_rs) / self.cc.c['TCMBmuK']**2. / ( (self.evalells + 1.) * self.evalells) * 2. * np.pi LF = LensForecast() if (option == 'None'): LF.loadGenericCls("ee", self.evalells, cls_rsxEE, self.evalells, self.N_ll_rsxEE) elif (option == 'NoILC'): LF.loadGenericCls("ee", self.evalells, cls_rsxEE, self.evalells, self.N_ll_rsx_NoFG) elif (option == 'Onlyfg'): LF.loadGenericCls("ee", self.evalells, cls_rsxEE, self.evalells, self.N_ll_rsxEE - self.N_ll_rsx_NoFG) else: return "Wrong option" sn, errs = LF.sn(ellBinEdges, fsky, "ee") # not squared cls_out = np.interp(ellMids, self.evalells, cls_rsxEE) return ellMids, cls_out, errs, sn
def Forecast_Cellyy(self, ellBinEdges, fsky, constraint='None'): ellMids = old_div((ellBinEdges[1:] + ellBinEdges[:-1]), 2) cls_tsz = self.fgs.tSZ(self.evalells,self.freq[0],self.freq[0]) / self.cc.c['TCMBmuK']**2. \ / ((self.evalells+1.)*self.evalells) * 2.* np.pi cls_yy = old_div(cls_tsz, (f_nu(self.cc.c, self.freq[0]))**2) # Normalized to get Cell^yy LF = LensForecast() if (constraint == 'None'): LF.loadGenericCls("yy", self.evalells, cls_yy, self.evalells, self.N_ll_tsz) elif (constraint == 'cmb'): LF.loadGenericCls("yy", self.evalells, cls_yy, self.evalells, self.N_ll_tsz_c_cmb) elif (constraint == 'cib'): LF.loadGenericCls("yy", self.evalells, cls_yy, self.evalells, self.N_ll_tsz_c_cib) else: return "Wrong option" sn, errs = LF.sn(ellBinEdges, fsky, "yy") # not squared cls_out = np.interp(ellMids, self.evalells, cls_yy) return ellMids, cls_out, errs, sn
def Forecast_Cellcmb(self,ellBinEdges,fsky,constraint='None'): ellMids = old_div((ellBinEdges[1:] + ellBinEdges[:-1]), 2) cls_cmb = self.cc.clttfunc(self.evalells) LF = LensForecast() if (constraint=='None'): LF.loadGenericCls("tt",self.evalells,cls_cmb,self.evalells,self.N_ll_cmb) elif (constraint=='tsz'): LF.loadGenericCls("tt",self.evalells,cls_cmb,self.evalells,self.N_ll_cmb_c_tsz) else: return "Wrong option" sn,errs = LF.sn(ellBinEdges,fsky,"tt") # not squared cls_out = np.interp(ellMids,self.evalells,cls_cmb) return ellMids,cls_out,errs,sn
# get index of mnu and print marginalized constraint indMnu = paramList.index('mnu') mnu = np.sqrt(np.linalg.inv(Fisher)[indMnu,indMnu])*1000. cprint("Sum of neutrino masses 1-sigma: "+ str(mnu) + " meV",color="green",bold=True) mnus.append(mnu) # CLKK S/N ============================================ # Calculate Clkk S/N Clkk = fidCls[:,4] frange = np.array(range(len(Clkk))) snrange = np.arange(kellmin,kellmax) LF = LensForecast() LF.loadKK(frange,Clkk,ls,Nls) sn,errs = LF.sn(snrange,fsky,"kk") cprint("Lensing autopower S/N: "+ str(sn),color="green",bold=True) # pl = Plotter(scaleY='log',xscale='log') # pl.add(frange,Clkk) # pl.add(ls,Nls) # pl._ax.set_ylim(-max(Clkk),max(Clkk)) # pl.done("clkk.png") sns.append(sn) # r Forecast ============================================ spellmin,spellmax = list_from_config(Config,'rForecast','pellrange')