Commit 7c0f6c4c authored by Maude Martin's avatar Maude Martin
Browse files

remove planck env routines + new option fftw3

parent ab6cda89
......@@ -67,60 +67,6 @@ def checkgroup (groupname, PIOTYPE, *args):
except Exception, e2:
print "cannot create group "+groupname+" !!!"
def ch_data_fn (grpname, filename):
""" Change pipelet filename into DMC object name.
Also create an empty file with DMC name into the pipelet directory
Parameters
----------
grpname: string, DMC group name
filename: string, pipelet file name
Returns
-------
string, DMC file name
"""
ifilename = filename
pipepath = os.path.dirname(filename)
pipepath2 = pipepath.split("/data")[-2]
key = pipepath2[-1-6:]
filename = os.path.basename(filename)
filename = filename.replace(".fits", "_"+key)
filename = grpname+"/"+filename
pipename = filename.replace("/", ":")
##os.system("ln -s %s %s"%(filename, ifilename))
os.system("touch "+pipepath+"/"+pipename)
filename_source = filename
filename_dest = ifilename
return filename_source
def glob_seg(glob_default, x, y):
""" Return the list of filename matching y in the working
directory of segment x.
Parameters
----------
x: string, segment name
y: string, regexp of file to glob.
Returns
-------
list of filenames.
"""
f = glob_default(x, y)
if not f:
z = y.replace(".fits", "")
z = "*:"+z
f = glob_default(x, z)
if f:
lst = []
for fi in f:
if len(fi.split("."))==1:
lst.append(os.path.basename(fi).replace(":", "/"))
f = lst
return f
def read_map(file):
""" Read Healpix map from file
......
......@@ -9,6 +9,7 @@ def set_options(ctx):
ctx.add_option('--omp', action='store', default=False, help='Openmp compilation')
ctx.add_option('--healpix_target', action='store', default='generic_gcc', help='healpix configuration')
ctx.add_option('--with_gsl', action='store', default='', help='location of gsl')
ctx.add_option('--with_fftw3', action='store', default='', help='location of fftw3')
ctx.add_option('--with_numpy_core', action='store', default='', help='location of numpy core headers')
ctx.tool_options('compiler_cxx')
ctx.tool_options('python')
......@@ -26,6 +27,7 @@ def configure(ctx):
ctx.env['HEALPIX_TARGET'] = str(Options.options.healpix_target)
ctx.env['CXXFLAGS'].append("-I"+str(Options.options.with_gsl)+"/include")
ctx.env['CXXFLAGS'].append("-I"+str(Options.options.with_fftw3)+"/include")
ctx.env['CXXFLAGS'].append("-I"+str(Options.options.with_numpy_core)+"/include")
if Options.options.omp:
ctx.env['CXXFLAGS'].append('-fPIC')
......@@ -38,8 +40,9 @@ def configure(ctx):
ctx.check_tool('compiler_cxx')
#ctx.check_fortran()
ctx.check(header_name=['gsl/gsl_rng.h', 'gsl/gsl_sort_double.h'],compile_mode='cxx', mandatory=True)
ctx.check(header_name=['fftw3.h'],compile_mode='cxx', mandatory=True)
ctx.check_cxx(lib=['gsl', 'gslcblas'], libpath=str(Options.options.with_gsl)+"/lib", uselib_store='gsl', mandatory=True)
ctx.check_cxx(lib=['fftw3'], libpath=str(Options.options.with_fftw3)+"/lib", uselib_store='fftw3', mandatory=True)
#ctx.find_file('numpy/arrayobject.h', mandatory=True)
def get_version():
......
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