Commit d3e91808 authored by Maude Le Jeune's avatar Maude Le Jeune
Browse files

update wscript wrt healpix/cfitsio install

use alm2cl for cross spectra
parent 222de2b8
......@@ -89,13 +89,17 @@ def alm2cov (almtab):
lmax = int(round((sqrt(1+8*nalm)-3) / 2) )
ncross = nin*(nin+1)/2
covtab = zeros((ncross, lmax+1))
spherelib_alm._alm2cov (almtab, covtab)
cov = zeros((nin, nin, lmax+1))
for ell in range(lmax+1):
cov[:,:,ell] = utils.vec2mat(covtab[:,ell])
for i in range(nin):
for j in range(i, nin):
cov[i,j,:] = healpy.alm2cl(almtab[i,:], almtab[j,:])
cov[j,i,:] = cov[i,j,:]
#covtab = zeros((ncross, lmax+1))
#spherelib_alm._alm2cov (almtab, covtab)
#cov = zeros((nin, nin, lmax+1))
#for ell in range(lmax+1):
# cov[:,:,ell] = utils.vec2mat(covtab[:,ell])
nmode = bin.get_nmode(bin.uniformbin (0, lmax, 1))
......
......@@ -37,11 +37,14 @@ def configure(ctx):
print('→ find cfitsio from cfitsio_prefix')
ctx.env["CFITSIO_PREFIX"] = str(Options.options.cfitsio_prefix)
ctx.env["CFITSIO_EXT_LIB"] = ctx.env["CFITSIO_PREFIX"]+'/lib'
ctx.env["CFITSIO_EXT_INC"] = ctx.env["CFITSIO_PREFIX"]+'/include/cfitsio'
ctx.env["CFITSIO_EXT_LIB"] = ctx.env["CFITSIO_PREFIX"]
ctx.env["CFITSIO_EXT_INC"] = ctx.env["CFITSIO_PREFIX"]
ctx.env['CXXFLAGS'].append("-I"+ctx.env["CFITSIO_EXT_INC"])
ctx.check(header_name=['fitsio.h'],compile_mode='cxx', mandatory=True)
ctx.check_cxx(lib=['cfitsio'], libpath=ctx.env["CFITSIO_EXT_LIB"], uselib_store='cfitsio', mandatory=True)
ctx.check_python_module('numpy')
#ctx.get_python_variables(["__file__", imports="numpy")
ctx.env['CXXFLAGS'].append("-I"+str(Options.options.with_gsl)+"/include")
ctx.env['CXXFLAGS'].append("-I"+str(Options.options.with_fftw3)+"/include")
......@@ -144,15 +147,15 @@ def build(bld):
libpath = [bld.env["HEALPIX_EXT_LIB"],bld.env["CFITSIO_EXT_LIB"]],
staticlib = ['cxxsupport', 'fftpack', 'healpix_cxx','sharp','c_utils'],
uselib_local = 'spherelib')
swig_spherelib_map.install_path = '${PYTHONDIR}/spherelib'
swig_spherelib_alm.install_path = '${PYTHONDIR}/spherelib'
swig_spherelib_bin.install_path = '${PYTHONDIR}/spherelib'
swig_spherelib_map.install_path = '${PREFIX}/spherelib'
swig_spherelib_alm.install_path = '${PREFIX}/spherelib'
swig_spherelib_bin.install_path = '${PREFIX}/spherelib'
obj = bld(features = 'py')
obj.find_sources_in_dirs( ['./spherelib', out+'/default/spherelib'], exts=['.py'] )
obj.find_sources_in_dirs( [out+'/default/spherelib'], exts=['.py'] )
obj.install_path = '${PYTHONDIR}/spherelib'
obj.install_path = '${PREFIX}/spherelib'
## TODO !!
#print('→ building icosahedron')
......
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