Commit f2b1113e authored by Matthieu Tristram's avatar Matthieu Tristram
Browse files

Merge branch 'master' of gitlab.in2p3.fr:xQML/xQML

Conflicts:
	TestEsti.py
	xqml/estimators.py
	xqml/libcov.py
	xqml/xqml.py
parents b3c88e99 4fd1b451
......@@ -68,8 +68,15 @@ lth = arange(2, lmax+1)
##############################
# Create mask
t, p = hp.pix2ang(nside, range(hp.nside2npix(nside)))
mask = np.ones(hp.nside2npix(nside), bool)
mask = hp.ud_grade(hp.read_map("../Masks/mask_DX12d_galpolco_30pc_ns2048.fits"), nside)
mask[mask > 0.5] = True
mask[mask < 0.5] = False
mask = np.array(mask, bool)
# t, p = hp.pix2ang(nside, range(hp.nside2npix(nside)))
# mask = np.ones(hp.nside2npix(nside), bool)
# import random
# random.shuffle(mask)
#mask[abs(90 - rad2deg(t)) < 20] = False
mask[(90 - rad2deg(t)) < glat] = False
......
......@@ -11,17 +11,24 @@ try:
except AttributeError:
numpy_include = numpy.get_numpy_include()
print( sys.argv)
if '--disable-openmp' in sys.argv:
sys.argv.pop(sys.argv.index('--disable-openmp'))
USE_OPENMP = False
else:
USE_OPENMP = True
if '--icc' in sys.argv:
sys.argv.pop(sys.argv.index('--icc'))
USE_ICC = True
else:
USE_ICC = False
libs = ['m']
use_icc = True if '--icc' in sys.argv else False
extra = ['-std=c99']
if use_icc:
extra = ['-std=gnu99']
if USE_ICC:
if USE_OPENMP:
libs += ['gomp', 'iomp5']
extra += ['-openmp']
......
......@@ -138,8 +138,16 @@ def El(invCAA, invCBB, Pl):
"""
<<<<<<< HEAD
El = np.asarray([np.dot(np.dot(invCAA, symarray(P)), invCBB) for P in Pl])
=======
lmax = len(Pl)
lrange = np.arange(lmax)
npix = len(invCAA)
# El = np.array([np.dot(np.dot(invCAA, Pl[l]), invCBB) for l in lrange]).reshape((lmax, npix, npix))
El = np.array([np.linalg.multi_dot((invCAA, Pl[l], invCBB)) for l in lrange]).reshape((lmax, npix, npix))
>>>>>>> 4fd1b451ce149e52585aba6331adb20ead8bcfb5
return El
......
......@@ -142,8 +142,6 @@ def SignalCovMatrix(Pl, model, SymCompress=False):
def compute_PlS(
ellbins, nside, ipok, allcosang, bl, clth, Slmax,
spec, pixwin=True, timing=False):
......
......@@ -155,11 +155,13 @@ class xQML(object):
# Compute E using Eq...
self.E = El(invCa, invCb, self.Pl)
if not self.cross:
self.bias = biasQuadEstimator(self.NA, self.E)
# Finally compute invW by inverting...
# s0 = timeit.default_timer()
print("Compute invW")
self.invW = linalg.inv(CrossWindowFunction(self.E, self.Pl))
# s1 = timeit.default_timer()
# self.invW = linalg.inv(CrossWindowFunctionLong(invCa, invCb, self.Pl))
......
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