A possible bug in Planck 2018 lensing likelihood

Use of Healpix, camb, CLASS, cosmomc, compilers, etc.
Post Reply
He Jia
Posts: 3
Joined: March 19 2019
Affiliation: Peking University / UC Berkeley

A possible bug in Planck 2018 lensing likelihood

Post by He Jia » September 06 2019

Hi,

I was trying to use the python interface of Planck 2018 lensing likelihood "smicadx12_Dec5_ftl_mv2_ndclpp_p_teb_consext8_CMBmarged", but I encountered a CError,

Code: Select all

<class 'str'>: (<class 'TypeError'>, TypeError('__str__ returned non-string (type bytes)',))
which was traced back to "self.get_clcmb_fid()". If I understand correctly, the issue is in ll. 79-83 of "src/python/clik/lkl_lensing.pyx":

Code: Select all

if apars.shape[0] == self.pdim:
    qpars = nm.concatenate((apars[:lmax[0]+1],self.get_cltt_fid(),apars[nm.sum(lmax[1:]+1):]))
    pars_proxy=nm.PyArray_ContiguousFromAny(qpars,nm.NPY_DOUBLE,1,1)
else:
    pars_proxy=nm.PyArray_ContiguousFromAny(apars,nm.NPY_DOUBLE,1,1)
According to the Planck 2018 lensing paper, in the 2015 version the CMB spectrum is fixed for lensing-only likelihood, but in the 2018 version the CMB part is completely marginalized out. It seems that Planck people forgot to modify the code here, so the program was trying to load the fiducial CMB spectrum via "self.get_clcmb_fid()", which does not exist in the "cl_fid" file.

I tried to change those lines to the following, and then it worked well on my side:

Code: Select all

pars_proxy=nm.PyArray_ContiguousFromAny(apars,nm.NPY_DOUBLE,1,1)

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

Re: A possible bug in Planck 2018 lensing likelihood

Post by Antony Lewis » September 06 2019

Thanks, could well be. Cobaya and CosmoMC also have native versions of the lensing likelihoods that do not need clik.

Post Reply