Commit 1a9f4c6b authored by Xavier Garrido's avatar Xavier Garrido
Browse files

Merge branch 'fix-pico-verbosity' into 'dev'

Get back to default verbosity

See merge request cosmotools/CAMEL!8
parents 4d792a73 aacc4e4d
......@@ -22,7 +22,7 @@
#include<iterator>
#include<algorithm>
//--------------------
// C
// C
//----------------
using namespace std;
......@@ -38,7 +38,7 @@ char* MnPicoEngine::clNames[]={"cl_TT","cl_EE","cl_TE","cl_BB",};
// Constructors --
//----------------
MnPicoEngine::MnPicoEngine(const Variables& _upar,const int& lmax, const string& picodata,bool verbose ):iAs(-1),ins(-1),inu(-1),pResult(NULL){
//superclass
_lmax=lmax;
......@@ -48,10 +48,10 @@ MnPicoEngine::MnPicoEngine(const Variables& _upar,const int& lmax, const string&
cout<<"loading pico datafile: " << picodata << endl;
pico=pico_load(const_cast<char*>(picodata.c_str()));
pico_set_verbose(pico,true);
pico_set_verbose(pico,verbose);
const int npico=sizeof(picoNames)/sizeof(char*);
//recherche si tous les parametres sont presnents
vector<string> inputNames;
for (size_t i=0;i<_upar.Params().size();i++) inputNames.push_back(_upar.GetName(i));
......@@ -65,11 +65,11 @@ MnPicoEngine::MnPicoEngine(const Variables& _upar,const int& lmax, const string&
planck_assert(it!=inputNames.end(),string("Missing parameter: ")+s);
vector<string>::size_type ipos=it-inputNames.begin();
_index.push_back(ipos);
if (s=="log(10^10A_s)")
if (s=="log(10^10A_s)")
iAs=ipos;
else if (s=="n_s")
else if (s=="n_s")
ins=ipos;
else if (s=="m_ncdm")
else if (s=="m_ncdm")
inu=ipos;
else if (s=="100*theta_s")
itet=ipos;
......@@ -93,8 +93,8 @@ MnPicoEngine::MnPicoEngine(const Variables& _upar,const int& lmax, const string&
//fill dict
updateParValues(_upar.Params());
}
......@@ -129,10 +129,10 @@ MnPicoEngine::updateParValues(const std::vector<double>& vals){
else{
PyDict_SetItemString(dict,picoNames[i],PyFloat_FromDouble(vals[_index[i]]));
}
}
//compute: clean?
pico_free_result(pResult);
pResult=pico_compute_result_dict(pico,dict,outputs);
......@@ -141,11 +141,11 @@ MnPicoEngine::updateParValues(const std::vector<double>& vals){
}
void
MnPicoEngine::getCls(const std::vector<unsigned>& lVec, //input
std::vector<double>& cltt,
std::vector<double>& clte,
std::vector<double>& clee,
void
MnPicoEngine::getCls(const std::vector<unsigned>& lVec, //input
std::vector<double>& cltt,
std::vector<double>& clte,
std::vector<double>& clee,
std::vector<double>& clbb){
double* ClTT=NULL;
......@@ -180,7 +180,7 @@ MnPicoEngine::getCls(const std::vector<unsigned>& lVec, //input
}
double
double
MnPicoEngine::undef(const char* param) const{
throw Message_error(string("Parameter=")+param+" not available in pico");
return -1.;
......
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