baudren / montepython_public

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

How to set tensor-to-scalar power spectrum ratio 'r' in *.param file? #89

Closed F-W-Yang closed 7 years ago

F-W-Yang commented 7 years ago

Hi, everybody! I am a beginner using Monte Python. I find that when I set tensor-to-scalar ratio r

 data.parameters['r'] = [1, 0, -1, 0.03, 1, 'cosmo']

in the parameter file and I try to fit the cosmic parameters with this file (-p *.param), an error occurs as follow:

 Cosmological Module Error:
/|\   Something went wrong when calling CLASS
/_o_\  Error in Class: Class did not read input parameter(s): r

However, in the explanatory.ini, the full documentation of CLASS, we can easily find that 'r' is assigned in line 524. So, why can't Class recognize the parameter 'r' and how should I set 'r' in Monte Python?

Thanks

ThomasTram commented 7 years ago

Hi

CLASS will not read "r" if there are no tensor modes required. You can ask for tensor modes by adding

data.cosmo_arguments['modes'] = 's, t'

in your parameter file.

Cheers, Thomas

F-W-Yang commented 7 years ago

It works! Thanks for your help!! @ThomasTram

F-W-Yang commented 7 years ago

@ThomasTram By the way, I am repeating one of your work (http://adsabs.harvard.edu/abs/2014JCAP...12..028A). And I have run the fitting and got a seemingly good result.

[Uploading planck_positive_1d.pdf…]() [Uploading planck_positive_triangle.pdf…]()

However, my result differs from yours, especially about the physical density of decaying cold dark matter plus its decay product (omega_dcdmdr < 0.00186) and the decay rate of DM (Gamma_dcdm < 147.8). In my fitting, the set of cosmic parameters I choose is {omega_b, omega_dcdmdr, 100theta_s, ln10^{10}A_s, n_s, tau_reio, Gamma_dcdm} and the data consists of 'Planck_highl', 'Planck_lowl' and 'Planck_lensing' (2015 released baseline data).

I notice that there are two likelihood files named clik_wmap_lowl and WiggleZ, but I can't find out 'wmap_7_2-32_gibbs.clik' and 'nov2011' on the Internet. I wonder where I can get the low-l WMAP polarization data and the WiggleZ data and *how you set the '.param' in Monte Python**. And I wonder if my result is meaningful in physics.

Waiting for your reply.

ThomasTram commented 7 years ago

Hi

Do you remember to set omega_cdm to a low value as well, i.e. 1e-6? Otherwise CLASS will assume the default value for CDM! As I remember, WiggleZ data is bundled with MontePython but I do not remember where to download WMAP data. Since it is a clik-version, perhaps it is on the Planck legacy webpage..

Cheers, Thomas

F-W-Yang commented 7 years ago

Hi,

@ThomasTram . Thank you for your reply again. After setting ω_cdm to 1e-6 and re-running the code, I got a more meaningful result. In my result, ω_dcdmdr and Γ_dcdm are close to yours, but r is 10% of yours (In my fitting, r <0.055, while r<0.13 in your paper "http://adsabs.harvard.edu/abs/2014JCAP...12..028A" @baudren) .

The setting of r in my.param file is as follow:

data.parameters['r'] = [0.1, 0.0, None, 0.03, 1, 'cosmo']

data.cosmo_arguments['modes'] = 's, t'

In my fitting, I used all of the data mentioned on your paper except the low-l WMAP polarization data. Do you think my result is reasonable? And I wonder if the missing of the WMAP data matters.

Thanks, Fengwei