Commit 9927fa55 authored by Matthieu Tristram's avatar Matthieu Tristram
Browse files

small updates

parent 4edf40de
......@@ -24,10 +24,7 @@ nbins=len(ellbins)-1
t,p=hp.pix2ang( nside, range(hp.nside2npix(nside)))
mask = np.ones(hp.nside2npix(nside),bool)
mask[abs(90-rad2deg(t)) < 10] = False
ip=arange(hp.nside2npix(nside))
ipok=ip[mask]
npix=len(ipok)
npix = sum(mask)
fwhm = 0.5
bl=gauss_beam(deg2rad(fwhm), lmax=Slmax+1)
......@@ -48,6 +45,9 @@ dm = cmb[1:,mask] + noise
###################################### Compute ds_dcb ######################################
ip=arange(hp.nside2npix(nside))
ipok=ip[mask]
Pl, S = xqml.compute_ds_dcb(ellbins,nside,ipok,bl,clth,Slmax,polar=True,temp=False, EBTB=False, pixwining=True, timing=True, MC=False)
Pl = Pl.reshape((nder)*(np.shape(Pl)[1]), 2*npix, 2*npix)
......
......@@ -18,11 +18,13 @@ import string
class xQML(object):
"""
(Cross-) power spectra estimation using the QML method.
Vanneste et al. 2018
[Vanneste et al. 2018]
Example
-------
xqml = xQML(mask, bins, clth)
esti = xqml.xQML(mask,ellbins, clth, Pl=Pl, fwhm=fwhm)
esti.construct_esti( NoiseVar, NoiseVar)
cl = esti.get_spectra( dm1, dm2)
"""
def __init__(self, mask, bins, clth, lmax=None, Pl=None, fwhm=0., polar=True, temp=False, EBTB=False):
......@@ -972,10 +974,9 @@ def ClQuadEstimator(invW, y):
Cl = np.dot(invW,y)
return Cl
def blEstimator(NoiseN, El):
def biasQuadEstimator(NoiseN, El):
'''
Compute bias term bl such that Cl = Fll^-1 . ( yl + bl)
Not to be confonded with beam function bl(fwhm)
Compute bias term bl such that Cl = Fll^-1 . ( yl + bias)
'''
lrange = np.arange((len(El)))
return np.array([np.sum(NoiseN*El[l]) for l in lrange])
......
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