## CAMB: Modified parameters for dynamic dark energy

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Malena Talvitie
Posts: 3
Joined: November 03 2021
Affiliation: University of Helsinki

### CAMB: Modified parameters for dynamic dark energy

Dear all,

Starting from the dynamic dark energy definition w(a) = w_0 + (1-a)*w_a, where w_0 is the current value and w_a is the variation of the equation-of-state with scale factor a, I have been trying to modify the dark energy parameters of the initial (w_0, w_a) parametrisation. I want to use a pivot scale a_p and the related equation-of-state parameter w_p = w(a_p) to define the initial parameter w_a via the equation w_a = (w_p - w_0)/(1 - a_p). For a starter, I have defined the ´dark_energy_model: ppf´ in the .yaml file and have then also added the parameters w_p and a_p to the parameter list of the .yaml file, as shown here below:

Code: Select all

...
params:
w:
prior:
min: -3
max: 1
ref:
dist: norm
loc: -0.99
scale: 0.02
proposal: 0.02
latex: w_{0,\mathrm{DE}}
wp:
prior:
min: -3
max: 2
ref:
dist: norm
loc: 0
scale: 0.05
proposal: 0.05
latex: w_{p,\mathrm{DE}}
ap: 0.8333  # fixed 1/1.2!
wa:
derived: 'lambda w, wp, ap: (wp-w)/(1-ap)'
min: -3
max: 2
latex: w_\mathrm{a}
we:
derived: 'lambda w, wa: w+wa'
min: -6
max: 0
latex: w_\mathrm{e}
...


I assumed that this would be enough to incorporate the new parameters into the calculation but it was not successful.

Then I read from the CAMB Input parameter model that "To add a new parameter, add it to the CAMBparams type in model.f90, then edit the _fields_ list in the CAMBparams class in model.py to add the new parameter in the corresponding location of the member list. After rebuilding the python version you can then access the parameter by using params.new_parameter_name where params is a CAMBparams instance." So I tried changing both the model.f90 and model.py file, as described above together with the modified .yaml file but was still unsuccessful.

Do I need to make further changes in some file like the DarkEnergyInterface.f90, DarkEnergyPPF.f90, or dark_energy.py?

Thank you very much in advance,
Marianne Talvitie

Antony Lewis
Posts: 1790
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

### Re: Cobaya: Modified parameters for dynamic dark energy

If you are just changing the parameterization rather than the physical parameterization the yaml approach should work. What exactly goes wrong? The min/max entries of the derived parameters may not work.

Malena Talvitie
Posts: 3
Joined: November 03 2021
Affiliation: University of Helsinki

### Re: CAMB: Modified parameters for dynamic dark energy

Thank you so much for picking up my question.

After changes only in the .yaml file, i.e., defining the new parameters w_p, a_p and giving the equation to w_a, like this:
...
wp:
prior:
min: -3
max: 2
ref:
dist: norm
loc: 0
scale: 0.05
proposal: 0.05
latex: w_{p,\mathrm{DE}}
ap: 0.8333 # fixed 1/1.2!
wa:
derived: 'lambda w, wp, ap: (wp-w)/(1-ap)'
min: -3
max: 2
latex: w_\mathrm{a}
...

and then running, the run gets terminated and the output contains this info:
...
[0 : model] *ERROR* Could not find anything to use input parameter(s) {'wp', 'ap'}.
[2 : model] *ERROR* Could not find anything to use input parameter(s) {'wp', 'ap'}.
[3 : model] *ERROR* Could not find anything to use input parameter(s) {'ap', 'wp'}.
[1 : model] *ERROR* Could not find anything to use input parameter(s) {'wp', 'ap'}.
[1 : exception handler] *ERROR* Could not find anything to use input parameter(s) {'wp', 'ap'}.
[3 : exception handler] *ERROR* Could not find anything to use input parameter(s) {'ap', 'wp'}.
[0 : exception handler] *ERROR* Could not find anything to use input parameter(s) {'wp', 'ap'}.
[2 : exception handler] *ERROR* Could not find anything to use input parameter(s) {'wp', 'ap'}.
[1 : exception handler] ---------------------------------------

...

Traceback (most recent call last):
File "/cobaya2021/bin/cobaya-run", line 11, in <module>
File "/cobaya2021/cobaya/run.py", line 216, in run_script
run(info, **arguments.__dict__)
File "/cobaya2021/cobaya/run.py", line 139, in run
stop_at_error=info.get("stop_at_error", False)) as model:
File "/cobaya2021/cobaya/model.py", line 159, in __init__
self._set_dependencies_and_providers(skip_unused_theories=skip_unused_theories)
File "/cobaya2021/cobaya/model.py", line 688, in _set_dependencies_and_providers
unassigned)
cobaya.log.LoggedError: Could not find anything to use input parameter(s) {'ap', 'wp'}.
-------------------------------------------------------------

[0 : exception handler] ---------------------------------------

Traceback (most recent call last):
File "/cobaya2021/bin/cobaya-run", line 11, in <module>
File "/cobaya2021/cobaya/run.py", line 216, in run_script
run(info, **arguments.__dict__)
File "/cobaya2021/cobaya/run.py", line 139, in run
stop_at_error=info.get("stop_at_error", False)) as model:
File "/cobaya2021/cobaya/model.py", line 159, in __init__
self._set_dependencies_and_providers(skip_unused_theories=skip_unused_theories)
File "/cobaya2021/cobaya/model.py", line 688, in _set_dependencies_and_providers
unassigned)
cobaya.log.LoggedError: Could not find anything to use input parameter(s) {'wp', 'ap'}.
-------------------------------------------------------------

srun: error: r03c32: tasks 0-3: Exited with exit code 1

Antony Lewis
Posts: 1790
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

### Re: CAMB: Modified parameters for dynamic dark energy

Try using "value" rather than "derived" for w, wa.

Malena Talvitie
Posts: 3
Joined: November 03 2021
Affiliation: University of Helsinki

### Re: CAMB: Modified parameters for dynamic dark energy

Thank you so much, I will do that!

Kindest regards,
Marianne Talvitie