## Planck 2018 lensing code gives different results than the params table?

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
He Jia
Posts: 5
Joined: March 19 2019
Affiliation: Princeton University
Contact:

### Planck 2018 lensing code gives different results than the params table?

Hi, I was trying to evaluate the smica lensing likelihood at the best fit point on page 270 of the params table, using pycamb and the python interface of Planck 2018 code.

Code: Select all

import clik
import numpy as np
import camb
pars = camb.CAMBparams()
pars.set_cosmology(cosmomc_theta=1.041060*0.01, ombh2=0.022509, omch2=0.11839,
omk=-0.0092, tau=0.0515)
pars.InitPower.set_params(As=1e-10*np.exp(3.0336), ns=0.96989)
pars.set_for_lmax(2508)
data = camb.CAMBdata()
data.calc_power_spectra(pars)
cmb = data.get_lensed_scalar_cls(lmax=2508, CMB_unit='muK', raw_cl=True)
lens = data.get_lens_potential_cls(lmax=2508, CMB_unit='muK', raw_cl=True)
m = np.concatenate((lens.T[0, :2501], cmb.T[0, :2501], cmb.T[1, :2501],
cmb.T[3, :2501], [1.00002]))
logp
The table says the chi2 of smica at that best fit point should be 9.79, where I'm getting 9.13, so there's a 0.66 difference for chi2. Could you help me check if this is some acceptable error of the code, or if it's because I'm not evaluating it correctly? Thanks!

PS: there seems to be something wrong with the attachments on my side. If you cannot see them, you can also find them using this link and this link.
Attachments
image2.png (77.45 KiB) Viewed 1385 times

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

### Re: Planck 2018 lensing code gives different results than the params table?

To get non-linear roughly consistent lensing C_L you need lens_potential_accuracy=1 argument to set_for_lmax.

He Jia
Posts: 5
Joined: March 19 2019
Affiliation: Princeton University
Contact:

### Re: Planck 2018 lensing code gives different results than the params table?

Thanks Antony! That solves the issue.