Commit 5371b4da authored by Plaszczynski Stephane's avatar Plaszczynski Stephane
Browse files

allow no CMB likelihoods lmax=-1

parent ef0f5225
......@@ -172,20 +172,26 @@ Chi2Factory::gimeChi2(Parser& parser){
throw Message_error("pico Engine required but no support compiled: define PICO in requiremnts");
#else
cout << "USING pico ENGINE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" << endl;
planck_assert(lmax>0,"no CMB likelihood defined: can't use pico");
e=new MnPicoEngine(parser.vars(),lmax,PICODATA,false);
#endif
}
else{
//extra class params
ClassParams classparms(parser.classparms);
classparms.add("l_max_scalars",lmax);
//CMB
string output="";
if (lmax>0) {
classparms.add("l_max_scalars",lmax);
output+="tCl,pCl,lCl";
}
//if P(k) needed
const bool doPk=parser.params.find<bool>("do_mPk",false);
if (doPk)
classparms.add("output","tCl,pCl,lCl,mPk"); //polar +lens+clphi+P(k)
else
classparms.add("output","tCl,pCl,lCl"); //polar +lens+clphi
if (doPk) output+=",mPk";
classparms.add("output",output); //polar +lens+clphi
for (size_t i=0;i<classparms.size();i++)
cout << "CLASS \t--> "<< classparms.key(i) << "\t" << classparms.value(i) <<endl;
......
......@@ -87,6 +87,8 @@ void ClassParams::updateVal(const unsigned& i,const string& newval) {pars[i].sec
//----------------
ClassEngine::ClassEngine(const ClassParams& pars): cl(0),dofree(true){
_lmax=-1; //default
cout << "Running CLASS version " << _VERSION_ << endl;
//prepare fp structure
......
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