Cobaya + CAMB: Modified Quintessence Module: H0 is not affecting theoretical theta
Posted: March 16 2021
Hello All,
I intend to modify the quintessence code in CAMB to produce two-dimensional contours and one-dimensional probability distributions for cubic potential model parameters. Before I implement my cubic potential model, I am first attempting to reproduce similar results as in the LCDM model so that I know that my implementation is working properly. Therefore, I have made my own quintessence class in Fortran derived from the base Quintessence class, as suggested in the CAMB "Read the Docs" page. My class is based on the "EarlyQuintessence" class, but I removed anything relating to the properties m, f, and zc, while keeping the same lines of code that generate the interpolation table. The potential model implemented is simply a parameterized constant for the zeroth derivative, and the parameter is being initialized in Fortran and passed properly through Python, and all greater derivatives are zero. The parameter for the potential constant is centered at 1e-7 1/Mpc^-2, and I have also parameterized the initial_phi, centered on 0.155 for now. The rest of the parameters are the default from using "cobaya-cosmo-generator" set to "Planck 2018 with CAMB". The VofPhi method of my quintessence class is as follows:
My issue is that in "model.py", in the "set_H0_for_theta" method of "CAMBparams", the root-finding "brentq" algorithm sees that f(a) and f(b) are the same value when I run this quintessence class with the constant potential. This is because altering the value of H0 does not change the "theta_test" variable regardless of whether or not "cosmomc_approx" is set to True. This causes the following errors that halt the run (where the first line is the explicit error from "brentq"):
It might help to know that in the quintessence results, grhob, grhoc, and grhov are all slightly different from the LCDM results at the same H0 values (and grho_no_de and grhov_t are different at the same a values), although this could be from my approximation of the potential constant.
Could someone please help me find why my "theta_test" variable is not changing with H0? I can share all portions of the code that I modified in case this helps see what I missed, although I have changed several files to accommodate my new class and parameters, so this might be tedious to look through.
Thank you for your time.
Respectfully,
S. David Storm
I intend to modify the quintessence code in CAMB to produce two-dimensional contours and one-dimensional probability distributions for cubic potential model parameters. Before I implement my cubic potential model, I am first attempting to reproduce similar results as in the LCDM model so that I know that my implementation is working properly. Therefore, I have made my own quintessence class in Fortran derived from the base Quintessence class, as suggested in the CAMB "Read the Docs" page. My class is based on the "EarlyQuintessence" class, but I removed anything relating to the properties m, f, and zc, while keeping the same lines of code that generate the interpolation table. The potential model implemented is simply a parameterized constant for the zeroth derivative, and the parameter is being initialized in Fortran and passed properly through Python, and all greater derivatives are zero. The parameter for the potential constant is centered at 1e-7 1/Mpc^-2, and I have also parameterized the initial_phi, centered on 0.155 for now. The rest of the parameters are the default from using "cobaya-cosmo-generator" set to "Planck 2018 with CAMB". The VofPhi method of my quintessence class is as follows:
Code: Select all
if (deriv==0) then
Vofphi = this%V0const
else if (deriv ==1) then
Vofphi = 0
else if (deriv ==2) then
Vofphi = 0
end if
Code: Select all
f(a) and f(b) must have different signs
2021-03-16 10:50:50,413 [camb] Out of bounds parameters. Assigning 0 likelihood and going on.
2021-03-16 10:50:50,413 [model] Calculation failed, skipping rest of calculations
2021-03-16 10:50:50,413 [model] Computed derived parameters: {'As': 2.1130229582959047e-09, 'H0': nan, 'omegam': nan, 'omegamh2': nan, 'omega_de': nan, 'YHe': nan, 'Y_p': nan, 'DHBBN': nan, 'zre': nan, 'sigma8': nan, 's8h5': nan, 's8omegamp5': nan, 's8omegamp25': nan, 'A': 2.113022958295905, 'clamp': 1.8660655819230805, 'age': nan, 'rdrag': nan, 'chi2__CMB': nan}
2021-03-16 10:50:50,413 [model] *ERROR* Could not find random point giving finite likelihood after 1160 tries
Could someone please help me find why my "theta_test" variable is not changing with H0? I can share all portions of the code that I modified in case this helps see what I missed, although I have changed several files to accommodate my new class and parameters, so this might be tedious to look through.
Thank you for your time.
Respectfully,
S. David Storm