for j, polComb in enumerate(polCombList): kappa = qest.getKappa(polComb) # pl = Plotter() # pl.plot2d(fftshift(qest.AL[polComb])) # pl.done("al.png") # sys.exit() reconLm = lensedTLm.copy() reconLm.data[:, :] = kappa[:, :].real print "crossing with input" p2d = ft.powerFromLiteMap(kappaLm, reconLm, applySlepianTaper=False) centers, means = stats.binInAnnuli(p2d.powerMap, p2d.modLMap, bin_edges) listCrossPower[polComb].append(means) p2d = ft.powerFromLiteMap(reconLm, applySlepianTaper=False) centers, means = stats.binInAnnuli(p2d.powerMap, p2d.modLMap, bin_edges) listReconPower[polComb].append(means) p2d = ft.powerFromLiteMap(kappaLm, applySlepianTaper=False) centers, means = stats.binInAnnuli(p2d.powerMap, p2d.modLMap, bin_edges) if k == 0: totInputPower = (means.copy() * 0.).astype(dtype=np.float64) totInputPower = totInputPower + means
with io.nostdout(): hpmap, alm = hp.synfast(cls, nside, alm=True, pol=False) lmap.loadDataFromHealpixMap(hpmap, interpolate=False, hpCoords="J2000") del hpmap if k == 0: taper, w2 = fmaps.get_taper(lmap.data.shape, taper_percent=12.0, pad_percent=3.0, weight=None) lmap.data *= taper if rank == 0 and k == 0: io.quickPlot2d(lmap.data, io.dout_dir + "flipper_map.png") p = ft.powerFromLiteMap(lmap) if k == 0: binner = stats.bin2D(p.modLMap, bin_edges) #pwin = hp.pixwin(nside) #pells = np.arange(0,pwin.size) #from scipy.interpolate import interp1d pwin2d = 1. #interp1d(pells,pwin,bounds_error=False,fill_value=0.)(p.modLMap) p2d = np.nan_to_num(p.powerMap / w2 / pwin2d**2.) cents, p1d = binner.bin(p2d) cls = hp.alm2cl(alm) mpibox.add_to_stack("full", cls) mpibox.add_to_stack("cut", p1d)