baudren / montepython_public

Public repository for the Monte Python Code
MIT License
65 stars 114 forks source link

Getting the Pk_cb with class v_2.7.2 #135

Closed gouyoub closed 4 years ago

gouyoub commented 4 years ago

Hi,

I created my own likelihood, but I have a problem when using it. In the loglkl method of my new likelihood class I am asking to class for the power spectrum of c+b (because I'm including massive neutrinos). I know that with the version of class that I'm using (version 2.7.2) this is possible. When running montepython it is saying that it is using the right class version "with CLASS v2.7.2"

but I get this error :

Traceback (most recent call last): File "montepython/MontePython.py", line 40, in sys.exit(run()) File "/renoir/gouyou/montepython_public/montepython/run.py", line 44, in run sampler.run(cosmo, data, command_line) File "/renoir/gouyou/montepython_public/montepython/sampler.py", line 43, in run mcmc.chain(cosmo, data, command_line) File "/renoir/gouyou/montepython_public/montepython/mcmc.py", line 301, in chain loglike = sampler.compute_lkl(cosmo, data) File "/renoir/gouyou/montepython_public/montepython/sampler.py", line 515, in compute_lkl value = likelihood.loglkl(cosmo, data) File "/renoir/gouyou/montepython_public/montepython/likelihoods/MatterPkCov/init.py", line 174, in loglkl Pktheo_temp[kk] = cosmo.pk_cb(self.k[kk],z) AttributeError: 'classy.Class' object has no attribute 'pk_cb'

So it's saying that it's using the right version but it's not...

Tell me if you need more info to understand/help me with this problem, Thank you.

Sylvain.

lesgourg commented 4 years ago

Dear Sylvain, This is not the right page nor the right version of the code! You found here a very old MontePython. As written on the front page and advertised in many places, MontePyhton has moved there since a couple of years: https://github.com/brinckmann/montepython_public There, you will be able to clone or download MontePyhton 3.2.0, wich is compatible with the P_cb option. If you have further problems, you can raise issues on that website. Best Julien

gouyoub commented 4 years ago

Hello,

Sorry for the inconvenience and thank you.

Best, Sylvain.

Le mar. 15 oct. 2019 à 10:54, lesgourg notifications@github.com a écrit :

Closed #135 https://github.com/baudren/montepython_public/issues/135.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/baudren/montepython_public/issues/135?email_source=notifications&email_token=AKGBCSASB2J57B7AG5TMW4TQOWANTA5CNFSM4JANEFN2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOUG3OHGI#event-2713117593, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKGBCSD4I2PDPRWLFKDDGCLQOWANTANCNFSM4JANEFNQ .

lesgourg commented 4 years ago

Aucun problème! :-)