brinckmann / montepython_public

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

how to use CLP model #280

Closed ming-jian closed 1 year ago

ming-jian commented 2 years ago

Hi, everyone, I want to use the Planck2018 and Pantheon datasets to constrain the CLP dark energy model with w = w0_fld + wa_fld*(1-a). I set w0_fld = -0.9, wa_fld = 0.0 in explanatory.ini and montepython/input/base2018TTTEEE.param, Pantheon.param

data.parameters['w0_fld'] = [0, None, None, 0, 1, 'derived'] data.parameters['wa_fld'] = [0, None, None, 0, 1, 'derived']

However, it stops!

Traceback (most recent call last): File "home/zhang/montepython/sampler.py", line 795, in compute_lkl data.get_mcmc_parameters(['derived']) File "classy.pyx", line 1962, in classy.Class.get_current_derived_parameters classy.CosmoSevereError:

Error in Class: w0_fld was not recognized as a derived parameter

Please help me how to modify the codes to use the CLP dark energy model?

brinckmann commented 2 years ago

Please search the existing issues and documentation before posting a new issue, as related questions have already been explained elsewhere in issues on this github, in the MontePython v3 paper, as well as on the CLASS github issues and documentation. In order to have CLASS consider the "fld" parameters you need to set: data.cosmo_arguments['Omega_Lambda'] = 0

You also need to set w0_fld and wa_fld as 'cosmo' parameters (these are sampled cosmological parameters) in order to sample them, not 'derived' parameters (these are parameters inferred from the sampled and fixed parameters, but that aren't used to compute observables). Also, running without any prior ranges on w0_fld and wa_fld is likely to cause problems for you, see my response e.g. on issue #212 .

You may also benefit from having a look at the MontePython and CLASS course material on Julien Lesgourgues' website.

Best, Thejs

ming-jian commented 1 year ago

Please search the existing issues and documentation before posting a new issue, as related questions have already been explained elsewhere in issues on this github, in the MontePython v3 paper, as well as on the CLASS github issues and documentation. In order to have CLASS consider the "fld" parameters you need to set: data.cosmo_arguments['Omega_Lambda'] = 0

You also need to set w0_fld and wa_fld as 'cosmo' parameters (these are sampled cosmological parameters) in order to sample them, not 'derived' parameters (these are parameters inferred from the sampled and fixed parameters, but that aren't used to compute observables). Also, running without any prior ranges on w0_fld and wa_fld is likely to cause problems for you, see my response e.g. on issue #212 .

You may also benefit from having a look at the MontePython and CLASS course material on Julien Lesgourgues' website.

Best, Thejs

Thanks very much Prof. Thejs ! It is ok !