Commit 0fba45b8 authored by Plaszczynski Stephane's avatar Plaszczynski Stephane
Browse files

cleaning in particular on pico

parent 3fa6405c
......@@ -23,8 +23,8 @@ include_dirs "../src/camel/JLA/jla_likelihood_v3/src"
#cfitsio
#include_dirs "$(CLIKDIR)/include"
#macro_append CAMEL_linkopts " -lcfitsio "
include_dirs "$(CLIKDIR)/include"
macro_append CAMEL_linkopts " -L$(CLIKDIR) -lcfitsio"
#JLA :needs cblas/lapack
macro_append cppflags ' -DJLA '
......@@ -50,8 +50,8 @@ macro_append CAMEL_linkopts "-L$(CLIKDIR)/lib -lcfitsio -lclik "
# PICO #still hardcoded
include_dirs "/usr/include/python2.7"
include_dirs "/usr/lib64/python2.7/site-packages/numpy/core/include"
include_dirs "/home/plaszczy/.local/lib/python2.7/site-packages/pypico"
macro_append CAMEL_linkopts " -L/home/plaszczy/softs/pypico-3.2.0/build/temp.linux-x86_64-2.7 -lpico -L/usr/lib64/python2.7/config -lpython2.7 "
include_dirs "$(PICO_CODE)/pypico"
macro_append CAMEL_linkopts " -L$(PICO_CODE)/build/temp.linux-x86_64-2.7 -lpico -L/usr/lib64/python2.7/config -lpython2.7 "
macro_append cppflags ' -DPICODATA=\"$(PICO_DATA)\" '
......
......@@ -33,7 +33,9 @@ public:
//to override: must return something comptible with -2log(L)
double chi2_eff(const std::vector<double>& par) const;
//no nuisances so use empty
std::vector<std::string> requires() const {return std::vector<std::string>();}
std::vector<std::string> requires() const
{return std::vector<std::string>();
}
void read_par_file(const std::string filename);
......
......@@ -34,16 +34,6 @@ using namespace std;
// Constructors --
//----------------
Chi2CMB::Chi2CMB(std::vector<ClLikelihood*>& mylik, Engine* klass,const Variables& p):Chi2Data(p,klass),vlik(mylik),verbose(false),_lmax(-1)
{
Chi2Data::_name="CMB_all";
//max des max
_lmax=vlik[0]->getTTmax();
for (size_t i=1;i<vlik.size();i++){
if (vlik[i]->getTTmax()>_lmax) _lmax=vlik[i]->getTTmax();
}
buildIndex();
}
Chi2CMB::Chi2CMB(const Variables& p):Chi2Data(p),verbose(false),_lmax(-1){
Chi2Data::_name="CMB_all";
......
......@@ -29,27 +29,23 @@ class Chi2CMB : public Chi2Data
public:
//constructors
Chi2CMB(std::vector<ClLikelihood*>& _mylik, Engine* _klass,const Variables& params);
//better : use the dynamic add method afterwards
//use the dynamic add method afterwards to add cllikelihoods
Chi2CMB(const Variables& params);
// destructor
~Chi2CMB();
//dynamique
void add(ClLikelihood* l) ;
virtual void add(ClLikelihood* l) ;
void setEngine(Engine* e){engine=e;}
void setVerbose(bool choice) { verbose=choice;}
//operator to override: must return something comptible with -2log(L)
double chi2_eff(const std::vector<double>& par) const;
virtual double chi2_eff(const std::vector<double>& par) const;
//nuisances from concatenation of all likelihoods
std::vector<std::string> requires() const;
virtual std::vector<std::string> requires() const;
//the lmax of all likelihoods
int getTTmax() const {return _lmax;}
......@@ -60,9 +56,6 @@ private:
bool verbose;
int _lmax;
//std::vector<std::string> nuiNames;
};
#endif
......
......@@ -9,7 +9,7 @@
// virtual methods, which are
// - the object name
// - the list of required **nuisance parameters** (in requires(...))
// -the chi2(...) function.
// -the chi2_eff(...) function.
//
// the "index" map can be used to retrieve the postion of the nuisance parameter anywhere in the params vector (chi2_eff)
// use : size_t index.find("Var")->second to access the index value of the nuisance parameter named 'Var'
......
......@@ -2,11 +2,13 @@
//KLASS
#include"Class/ClassEngine.hh"
#include"Parser.hh"
#include <iostream>
#include<string>
#include <stdexcept>
#include<vector>
using namespace std;
......@@ -40,7 +42,7 @@ int main(int argc,char** argv){
//other params
pars.add("k_pivot",0.05);
pars.add("sBBN file","/sps/planck/Users/plaszczy/CAPTAINFLAM/HEAD/par/bbn/sBBN.dat");
pars.add("sBBN file",Parser::getParFile("bbn/sBBN.dat"));
pars.add("l_max_scalars",l_max_scalars);
pars.add("lensing",true); //note boolean
......
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