I've seen the current FKEM method fail catastrophically in some cases. For instance, the following code:
import numpy as np
import matplotlib.pyplot as plt
import pyccl as ccl
# Redshift distribution
z = np.linspace(0, 4.72, 60)
nz = z**2*np.exp(-0.5*((z-1.5)/0.7)**2)
# Bias
bz = 0.278*((1 + z)**2 - 6.565) + 2.393
plt.figure()
plt.plot(z, nz*bz)
plt.xlabel(r'$z$', fontsize=16)
plt.ylabel(r'$b(z)\,\phi(z)$', fontsize=16)
# Power spectra
ls = np.unique(np.geomspace(2, 2000, 128).astype(int)).astype(float)
cosmo = ccl.CosmologyVanillaLCDM()
tracer_gal = ccl.NumberCountsTracer(cosmo, has_rsd=False, dndz=(z, nz), bias=(z, bz))
cl_gg = ccl.angular_cl(cosmo, tracer_gal, tracer_gal, ls,
l_limber=-1, p_of_k_a=cosmo.get_nonlin_power(), p_of_k_a_lin=cosmo.get_linear_power())
cl_ggn = ccl.angular_cl(cosmo, tracer_gal, tracer_gal, ls,
l_limber=1000, p_of_k_a=cosmo.get_nonlin_power(), p_of_k_a_lin=cosmo.get_linear_power())
plt.figure()
plt.plot(ls, cl_gg, 'k-', label='Limber')
plt.plot(ls, cl_ggn, 'r--', label='Non-Limber')
plt.loglog()
plt.legend()
plt.xlabel(r'$\ell$', fontsize=16)
plt.ylabel(r'$C_\ell$', fontsize=16)
I wonder if this is related to how wide the redshfit distribution is in this case. Perhaps some of the internal FKEM parameters should be made tweakable to deal with this?
I've seen the current FKEM method fail catastrophically in some cases. For instance, the following code:
yields the result

I wonder if this is related to how wide the redshfit distribution is in this case. Perhaps some of the internal FKEM parameters should be made tweakable to deal with this?
@paulrogozenski @xfangcosmo , thoughts?