Page 1 of 1

A possible bug in Planck 2018 lensing likelihood

Posted: September 06 2019
by He Jia
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)

Re: A possible bug in Planck 2018 lensing likelihood

Posted: September 06 2019
by Antony Lewis
Thanks, could well be. Cobaya and CosmoMC also have native versions of the lensing likelihoods that do not need clik.

Re: A possible bug in Planck 2018 lensing likelihood

Posted: April 21 2020
by Alex Hall
I find the same bug. The above modification seems to have fixed it!