baudren / montepython_public

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

sigma8 #42

Closed annaefre closed 9 years ago

annaefre commented 9 years ago

Hello, I am trying to insert sigma8 in the derived parameters. From what I can see in the classy.pyx and classy.pxd of the CLASS code version I am using (2.2.0), sigma8 seems to be a parameter that Montepython recognizes. However when I put it in my param file

data.parameters['sigma8']    = [0.8,-1,-1, 0,     1,   'derived']

I obtain only zeros for sigma8.

Thanks in advance

baudren commented 9 years ago

Hello @annaefre ,

what are your other parameters in input? Did you set mPk in the desired output spectra? I think the default behaviour is to not compute mPk, and therefore sigma8 is zero. Let me know

annaefre commented 9 years ago

Hello @baudren , I have checked my classy files and I have

    def set_default(self):
        _pars = {
            "output":"tCl mPk",}
        self.set(**_pars)

Does not this mean I set mPk as output spectrum? However I find in my log.param:

data.cosmo_arguments.update( 'output': ' tCl lCl pCl ')

which means I do no have mPk as output. Where should I set the output spectra? Thank you in advance for your help

baudren commented 9 years ago

The output spectra are set automatically depending on which experiments you are testing. By selecting only CMB experiments, only Cls will be computed, to save time. The default behaviour you are seeing only affects classy, not the way MontePython calls classy.

To explicitely pass an argument to classy, you can use the following, in your .param file, after the cosmological and derived parameters:

...
data.cosmo_arguments['output'] = 'mPk'
...

It is the same way that what is used in the base.param file.

Don't forget to remote your output folder first (the one containing the log.param you showed), otherwise re running will have no effect.

Let me know if things are solved,

annaefre commented 9 years ago

Now it works, thank you for your help!