Closed astrogirl1 closed 4 years ago
Hi Meera,
this sounds correct on the CLASS side, adding a parameter in background.h and input.c allows CLASS to run with it. Here is an example implementation of such a value.
Maybe the issue is in Monte Python? I suggest you run your modified CLASS version with just an input file (i.e. without Monte Python) and check if the error occurs. Either just add value = 42
to e.g. explanatory.ini
or use the python wrapper:
from classy import Class
cosmo = Class()
p = {'output': 'tCl lCl pCl mPk', 'value': 47}
cosmo.set(p)
cosmo.compute()
If this works the issue should be with implementing the parameter in Monte Python; with that I have no experience.
Cheers, Stefan
Hi Stefan, Thank you for your help, after looking at your example, I think I missed something when defining the new variable, but now it works! :)
Hi, I am working with MCMC chains using Monte python and CLASS together for which I need to introduce a new 'cosmo' parameter in the Monte Python input file, like the following: in a .param file:
This value will be used in the background.c file in the future, so accordingly I have added the following definitions in the required files as a check to see if CLASS can actually read this parameter:
But I keep running into this error:
Cosmological Module Error: /|\ Something went wrong when calling CLASS /o\ Error in Class: Class did not read input parameter(s): value
I am unsure if this is the correct way to add a new parameter that CLASS uses, if this is a monte python issue or if I am missing something in defining the parameter. Any help is greatly appreciated!
Cheers, Meera