I am faced to an issue that could seem to be simple to fix. I am looking for the posterior of Brans-Dicke parameter omega_BD.
For this, I am using autoemcee. My problem is that I can't get accepted proposal to build a MCMC chain.
Here is a part of code :
Code: Select all
path_to_planck_likelihood = './baseline/plc_3.0/hi_l/plik_lite/plik_lite_v22_TT.clik'
planck_likelihood = clik.clik(path_to_planck_likelihood)
def get_spectrum(omega_BD):
omega_BD = float(omega_BD)
params['parameters_smg'] = '0.7,' + str(omega_BD) + ', 1., 1.'
# Configurez et exécutez CLASS
cosmology = Class()
cosmology.set(params)
cosmology.compute()
# Obtenez les spectres pertinents
cl = cosmology.lensed_cl(2500)
spectrum = cl['tt']
#spectrum = np.append(spectrum, [0]*9)
cosmology.struct_cleanup()
cosmology.empty()
return spectrum
Code: Select all
loglike = -0.5 * planck_likelihood(spectrum)
File "lkl.pyx", line 82, in clik.lkl.clik.__call__
Exception: Bad shape (expecting (-1,2510) got (1,2501))
2) Is the filling by zero of last 10 elements correct ?
3) Have I well taken the good type of spectrum like this :
Code: Select all
spectrum = cl['tt']
Any help is welcome.
ps : here the file brans_dicke init file used by Hi-CLASS :
Code: Select all
Parameter file for Brans Dicke theory
-> See Avilez+13 (1303.4330) or Bellini+17 (1709.09135)
Omega_Lambda = 0
Omega_fld = 0
Omega_smg = -1
1) Brans-Dicke theory: G_2 -> (omega_BD/phi)X -V0,
G_4 -> phi M_p^2/2
initial field value sets M_*^2 (effective Planck mass)
gravity_model = brans dicke
V0, omega_BD, phi_ini, phi'_ini
#parameters_smg = 0.7, 45000, 1., 0
parameters_smg = 0.7, 42500, 1., 1e-3
2) Options for tuning of effective M_pl using phi_ini
Note that (b,c) are very close for large omega_BD (viable models)
a) No specifications uses the input_value
#comment M_pl_today_smg line below
b) Specifying M_pl_today fixes phi_0
(overwrites phi_ini)
M_pl_today_smg = 1.0
c) Specifying M_pl_today AND normalize_G_NR
sets G_eff -> 1 for non-relativistic matter
(overwrites phi_ini AND M_pl_today_smg)
#normalize_G_NR = yes
3) Brans Dicke runs into some numerical problems at very early times
a_min_stability_test_smg = 1e-6
------ other parameters --------
root = output/brans_dicke_
#output = tCl,mPk
output_background_smg = 10
write parameters = yeap
write background = yup
write thermodynamics = yeahh
input_verbose = 4
background_verbose = 4
output_verbose = 1
thermodynamics_verbose = 1
perturbations_verbose = 2
spectra_verbose = 2