-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Learning MontePython and CosmoMC #111
Comments
You can find MontePython tutorials on the course page of Julien Lesgourgues' website: |
I found this to a very good tutorial: http://www.iac.es/congreso/cosmo2017/media/montepython.pdf |
@ivandebono Thank you, I have checked it before, but similar to Cosmo MC, EMCEE, CosmoHammer needs to clarifications and class to learn. Really I don't understand why these tutorial are not simple. Assume, in mathematics class they teach 2+2 and in the exam they want us to solve 3order ODE. |
I get your point. The best way to learn Montepython is to talk to experienced users, or even someone who's justing starting out. With software, you can often find solutions to little snags just by discussing them with someone else. I would be happy to provide some hints if you would let me know what you need. I put up a couple of posts on my website, but they're specific to users of the computing cluster at my institute. |
@ivandebono Thank you. Unfortunately I couldn't find anyone so for to do so. But the whole thing is fitting data of a model in astrophysics, from simple models like wCDM to complicated ones. I have wanted to learn EMCEE but after writing the code, there were no one to help me that what are the probable problems of my code (Teachers of EMCEE and authors of papers). Hence, I went toward using MontePython, But this one is more harder than EMCEE. Sometimes I tell God: God, for God sake help me :)) |
I find that gods tend to have their favourites which they shower with favours, while ignoring the pleas of the rest. Be that as is it may. The first thing to do is to choose a data set to which you wish to fit your model. Then you must choose a theoretical model: Lambda CDM, or wCDM, for example. It doesn't matter which values your parameters take. You will decide that later. The instructions here are quite straightforward: In this example, the date is a fake Planck data set (i.e. essentially CMB anisotropy measurements), and the theoretical model is Lambda CDM. You are trying to find the best value of the six parameters in the Lambda CDM model. You choose the parameters to fit (usually the ones which will appear in your final triangle plot) in input/lcdm.param I hope that helps. Have you tried running the example shown here? You should do that before tackling harder stuff. |
@ivandebono I will try it out for sure. The first reason of why I came toward learning MontePython etc, was my problem in metropolis hastings method. I wrote a correct code in Python, but in each run it printed different outputs. So, I am getting stuck in a loop. |
About trying MP(montepython), I have to install ubunto, then running a MP code to see what is the output. |
Try running the example here: http://monte-python.readthedocs.io/en/latest/example.html If you get stuck, I'll try to help. |
Yeah, thank you. I read this link before, but first of all I need to read http://monte-python.readthedocs.io/en/latest/installation.html. I really do not understand what are the instructions. For me they seem Chinese language. |
Though not quite Chinese, the instructions could do with a bit of language editing. What these instructions mean to say is that the location CLASS needs to be specified in the default configuration file used by Montepython. If you followed the installation instructions, you should have installed CLASS somewhere. There is a file called 'default.conf' in the folder called 'montepython'. It should contain the following line: Replace 'path/to/your/class/' with the file path to the folder containing CLASS. If you installed it in your home directory, the typical file path would look like this: '~/class'. Or, if you're running your calculations on a cluster with many users, it would be something like '/home/username/class'. So the line would be: path['cosmo'] = '~/class' or path['cosmo'] = '/home/username/class' |
I created a folder (with name 'code') copied and pasted the 'montepython' in it. then I downloaded and pasted 'class' folder in code folder too. I mean code folder contains two folders by now, montepython and class. For directory in configuration file should I write: path['cosmo'] = 'c:\user...\class' or its place in code folder is path['cosmo'] = '~/class'. the code folder is in my desktop. and path['clik'] = 'path/to/your/plc/folder/' what path must be written in it? Ah, too many questions. Sorry. |
Here's my configuration file. It contains just three lines, giving the location of the root directory (i.e. the home directory where I find myself when I log into the computing cluster), the path to CLASS, and the path to the Planck likelihood code (clik). The cluster runs on UNIX, so you may need to adapt it to your operating system. I haven't tried running it on Windows. root = '/home/debono' |
It's been a while, but I thought I might flag up this link: http://borisbolliet.com/Research.html It contains one of the best tutorials on Montepython, dealing with some problems specific to installing and running on a cluster (which is what most of us do). |
Thank you dear friend. By the way I need to be focused on. I will try to learn it. These months I was working on some papers. |
Dear friends. I have just learnt to use MCMC (M-H algorithm). Now I would like to go toward learning Motepython and CosmoMC.
At first step, I choose MontePython. But I could not find any useful tutorial. I think it is very complicated. Could you help me about this issue?
The text was updated successfully, but these errors were encountered: