1
1
# Tries to evaluate the likelihood at LCDM's best fit of Planck 2015, with CAMB and CLASS
2
2
from copy import deepcopy
3
3
4
- from cobaya .cosmo_input import planck_precision
4
+ from cobaya .cosmo_input import cmb_precision
5
5
6
6
from .common_cosmo import body_of_test
7
7
31
31
"Y_p" ,
32
32
]
33
33
34
- # Small chi2 difference with CLASS (total still <0.5)
35
- classy_extra_tolerance = 0.45
34
+ # Setting some parameter to "historical" values to reproduce Planck results
35
+ planck_2018_precision = deepcopy (cmb_precision )
36
+ planck_2018_precision ["camb" ].update ({
37
+ "halofit_version" : "mead2016" ,
38
+ "bbn_predictor" : "PArthENoPE_880.2_standard.dat" ,
39
+ })
40
+ planck_2018_precision ["classy" ].update ({
41
+ "non linear" : "hmcode" ,
42
+ "hmcode_version" : "2016" ,
43
+ "sBBN file" : "sBBN_2017.dat" ,
44
+ "want_lcmb_full_limber" : "no" , # When it's on, it changes by chi2 ~ 0.5
45
+ })
46
+
47
+ # Small chi2 difference with CLASS (total still <0.35)
48
+ classy_extra_tolerance = 0.25
36
49
37
50
38
51
# STANDARD ###############################################################################
@@ -48,7 +61,7 @@ def test_planck_2018_t_camb(packages_path, skip_not_installed, clik=False):
48
61
"planck_2018_lowl.TT"
49
62
)
50
63
chi2 ["planck_2018_lowl.TT_clik" ] = chi2 .pop ("planck_2018_lowl.TT" )
51
- info_theory = {"camb" : {"extra_args" : planck_precision ["camb" ]}}
64
+ info_theory = {"camb" : {"extra_args" : planck_2018_precision ["camb" ]}}
52
65
best_fit_derived = derived_lowl_highTT_lensing
53
66
body_of_test (
54
67
packages_path ,
@@ -75,7 +88,7 @@ def test_planck_2018_p_camb(packages_path, skip_not_installed, clik=False):
75
88
"planck_2018_lowl.EE"
76
89
)
77
90
chi2 ["planck_2018_lowl.EE_clik" ] = chi2 .pop ("planck_2018_lowl.EE" )
78
- info_theory = {"camb" : {"extra_args" : planck_precision ["camb" ]}}
91
+ info_theory = {"camb" : {"extra_args" : planck_2018_precision ["camb" ]}}
79
92
best_fit_derived = derived_lowTE_highTTTEEE_lensingcmblikes
80
93
body_of_test (
81
94
packages_path ,
@@ -100,7 +113,7 @@ def test_planck_2018_t_lite_camb(packages_path, skip_not_installed, native=False
100
113
best_fit .pop ("H0" )
101
114
like_name = "planck_2018_highl_plik.TT_lite" + ("_native" if native else "" )
102
115
info_likelihood = {like_name : None }
103
- info_theory = {"camb" : {"extra_args" : planck_precision ["camb" ]}}
116
+ info_theory = {"camb" : {"extra_args" : planck_2018_precision ["camb" ]}}
104
117
chi2 = {like_name : chi2_planck_2018_plikHM_highTT_lite , "tolerance" : 0.01 }
105
118
body_of_test (
106
119
packages_path ,
@@ -123,7 +136,7 @@ def test_planck_2018_p_lite_camb(packages_path, skip_not_installed, native=False
123
136
best_fit .pop ("H0" )
124
137
like_name = "planck_2018_highl_plik.TTTEEE_lite" + ("_native" if native else "" )
125
138
info_likelihood = {like_name : None }
126
- info_theory = {"camb" : {"extra_args" : planck_precision ["camb" ]}}
139
+ info_theory = {"camb" : {"extra_args" : planck_2018_precision ["camb" ]}}
127
140
chi2 = {like_name : chi2_planck_2018_plikHM_highTTTEEE_lite , "tolerance" : 0.01 }
128
141
body_of_test (
129
142
packages_path ,
@@ -149,7 +162,7 @@ def test_planck_2018_t_unbinned_camb(packages_path, skip_not_installed):
149
162
best_fit .pop ("H0" )
150
163
like_name = "planck_2018_highl_plik.TT_unbinned"
151
164
info_likelihood = {like_name : None }
152
- info_theory = {"camb" : {"extra_args" : planck_precision ["camb" ]}}
165
+ info_theory = {"camb" : {"extra_args" : planck_2018_precision ["camb" ]}}
153
166
chi2 = {like_name : 8275.99 , "tolerance" : 0.03 }
154
167
body_of_test (
155
168
packages_path ,
@@ -166,7 +179,7 @@ def test_planck_2018_p_unbinned_camb(packages_path, skip_not_installed):
166
179
best_fit .pop ("H0" )
167
180
like_name = "planck_2018_highl_plik.TTTEEE_unbinned"
168
181
info_likelihood = {like_name : None }
169
- info_theory = {"camb" : {"extra_args" : planck_precision ["camb" ]}}
182
+ info_theory = {"camb" : {"extra_args" : planck_2018_precision ["camb" ]}}
170
183
chi2 = {like_name : 24125.92 , "tolerance" : 0.01 }
171
184
body_of_test (
172
185
packages_path ,
@@ -209,7 +222,7 @@ def test_planck_2018_t_CamSpec_camb(packages_path, skip_not_installed):
209
222
"calEE" : 1.0 ,
210
223
}
211
224
)
212
- info_theory = {"camb" : {"extra_args" : planck_precision ["camb" ]}}
225
+ info_theory = {"camb" : {"extra_args" : planck_2018_precision ["camb" ]}}
213
226
body_of_test (
214
227
packages_path ,
215
228
best_fit ,
@@ -236,7 +249,7 @@ def test_planck_2018_t_CamSpec2021_camb(packages_path, skip_not_installed):
236
249
"n_143x217" : 0.96638 ,
237
250
}
238
251
)
239
- info_theory = {"camb" : {"extra_args" : planck_precision ["camb" ]}}
252
+ info_theory = {"camb" : {"extra_args" : planck_2018_precision ["camb" ]}}
240
253
body_of_test (
241
254
packages_path ,
242
255
best_fit ,
@@ -275,7 +288,7 @@ def test_planck_2018_p_CamSpec_camb(packages_path, skip_not_installed):
275
288
"calEE" : 1.0 ,
276
289
}
277
290
)
278
- info_theory = {"camb" : {"extra_args" : planck_precision ["camb" ]}}
291
+ info_theory = {"camb" : {"extra_args" : planck_2018_precision ["camb" ]}}
279
292
body_of_test (
280
293
packages_path ,
281
294
best_fit ,
@@ -304,7 +317,7 @@ def test_planck_2018_p_CamSpec2021_camb(packages_path, skip_not_installed):
304
317
"calEE" : 1.00124 ,
305
318
}
306
319
)
307
- info_theory = {"camb" : {"extra_args" : planck_precision ["camb" ]}}
320
+ info_theory = {"camb" : {"extra_args" : planck_2018_precision ["camb" ]}}
308
321
body_of_test (
309
322
packages_path ,
310
323
best_fit ,
@@ -321,7 +334,7 @@ def test_planck_2018_p_CamSpec2021_camb(packages_path, skip_not_installed):
321
334
def test_planck_2018_lcmbmarged_camb (packages_path , skip_not_installed ):
322
335
best_fit = params_lensing_cmbmarged
323
336
info_likelihood = lik_info_lensing_cmbmarged .copy ()
324
- info_theory = {"camb" : {"extra_args" : planck_precision ["camb" ]}}
337
+ info_theory = {"camb" : {"extra_args" : planck_2018_precision ["camb" ]}}
325
338
best_fit_derived = {}
326
339
body_of_test (
327
340
packages_path ,
@@ -342,7 +355,7 @@ def test_planck_2018_t_classy(packages_path, skip_not_installed):
342
355
best_fit .pop ("theta_MC_100" )
343
356
best_fit = params_lowl_highTT_lensing
344
357
info_likelihood = lik_info_lowl_highTT_lensing .copy ()
345
- info_theory = {"classy" : {"extra_args" : planck_precision ["classy" ]}}
358
+ info_theory = {"classy" : {"extra_args" : planck_2018_precision ["classy" ]}}
346
359
best_fit_derived = deepcopy (derived_lowl_highTT_lensing )
347
360
for p in classy_unknown :
348
361
best_fit_derived .pop (p , None )
@@ -363,7 +376,7 @@ def test_planck_2018_p_classy(packages_path, skip_not_installed):
363
376
best_fit = deepcopy (params_lowTE_highTTTEEE_lensingcmblikes )
364
377
best_fit .pop ("theta_MC_100" )
365
378
info_likelihood = lik_info_lowTE_highTTTEEE_lensingcmblikes .copy ()
366
- info_theory = {"classy" : {"extra_args" : planck_precision ["classy" ]}}
379
+ info_theory = {"classy" : {"extra_args" : planck_2018_precision ["classy" ]}}
367
380
best_fit_derived = deepcopy (derived_lowTE_highTTTEEE_lensingcmblikes )
368
381
for p in classy_unknown :
369
382
best_fit_derived .pop (p , None )
@@ -468,7 +481,7 @@ def test_planck_2018_p_classy(packages_path, skip_not_installed):
468
481
chi2_lowTE_highTTTEEE_lensingcmblikes = {
469
482
"planck_2018_lowl.TT" : 23.25 ,
470
483
"planck_2018_lowl.EE" : 396.05 ,
471
- "planck_2018_highl_plik.TTTEEE" : 2345.01 ,
484
+ "planck_2018_highl_plik.TTTEEE" : 2344.93 ,
472
485
"planck_2018_lensing.native" : 8.87 ,
473
486
"tolerance" : 0.11 ,
474
487
}
0 commit comments