lesgourg / class_public

Public repository of the Cosmic Linear Anisotropy Solving System (master for the most recent version of the standard code; GW_CLASS to include Cosmic Gravitational Wave Background anisotropies; classnet branch for acceleration with neutral networks; ExoCLASS branch for exotic energy injection; class_matter branch for FFTlog)
223 stars 292 forks source link

Zero value from new derived parameters (inverse cosmographic approach) #437

Open savero12 opened 3 years ago

savero12 commented 3 years ago

Hello everyone! I would like to ask about how to create new derived parameter that can be run with monte python. So, I would like to constrain cosmographic parameters (deceleration parameter, jerk parameter, snap parameter, and lerk parameter) with cosmological data (Pantheon, BAO, and Observation Hubble Data).

Basically, I did an inverse cosmography methods with Pantheon data. I make Omega_cdm as a cosmological parameter, Omega_m and q0 (new derived parameter) as derived parameter. But when I ran MontePython it gave me

zero q0 value

But when I ran Omega_m only as derived parameter (without q0), the MP ran properly. I think there is a mistake when I define the q0 in class. I follow step from https://github.com/lesgourg/class_public/issues/291 to define the q0 in class. Here is my code in class:

I use this setting in MontePython lcdm_pantheon.param:

data.parameters['Omega_cdm'] = [0.177, -1.0, None, -0.01, 1, 'cosmo'] data.parameters['M'] = [-19.2435, None, None, 0.0373, 1, 'nuisance'] data.parameters['Omega_m'] = [0, -1, 1, 0,1, 'derived'] data.parameters['q0'] = [0, -1, 1, 0,1, 'derived']

and using data.py:

elif elem == q0: omega_b =self.cosmo_arguments['omega_b'] q0 =self.cosmo_arguments['q0'] self.cosmo_arguments['omega_cdm'] = ((q0+1.)*2/3) - omega_b del self.cosmo_arguments[elem]

What should I do to get the q0 value as a derived parameter? I hope you guys can help me :) Thank you