brinckmann / montepython_public

Public repository for the Monte Python Code
MIT License
93 stars 81 forks source link

help on the usage of KiDS-1000 for montepython #349

Closed ming-jian closed 11 months ago

ming-jian commented 11 months ago

Hi everyone,

I want to use the kids-1000 COSEBIs to study a dark energy model. I have installed the cosmosis and kcap. However, it does not work. In detail, 1) I use: pip install cosmosis in the ubuntu terminal. 2) I install kcap:

git clone git@github.com:KiDS-WL/kcap.git cd kcap conda env creat -f conda_env.yaml pip install camb python build.py

I use the K1K_COSEBIs.param for the MontePython-3.5. However, it always shows " no module named cosmosis". I donot know where is the problem. Could you give me some help on the usage of KiDS-1000 for montepython?

Thanks!

brinckmann commented 11 months ago

Hi Ming-Jian,

My best guess is it is either not properly installed, sourced, or added to the relevant paths, e.g. python paths where python looks for modules, but you might have to ask someone from the collaboration for help on a likelihood-specific issue.

Best, Thejs

BStoelzner commented 11 months ago

Hi Ming-Jian,

This sounds like KCAP wasn't installed successfully. Were there any errors when running python build.py? What happens if you run import cosmosis in an interactive python session?

Note that KCAP installs a version of cosmosis that is a bit outdated by now and sometimes causes some problems. As an alternative, you could try to install the most recent version via pip install cosmosis and just manually compile the modules in kcap/cosebis (these are the only kcap modules that are required to run the MontePython likelihood). You just need to make sure to point K1K_COSEBIs.kcap_directory in K1K_COSEBIs.data to your KCAP directory.

Best, Benjamin

brinckmann commented 11 months ago

Thank you very much, Benjamin!

Best, Thejs