LSSTDESC / CCL

DESC Core Cosmology Library: cosmology routines with validated numerical accuracy
BSD 3-Clause "New" or "Revised" License
144 stars 65 forks source link

Correlation function BAO damping #818

Open patricialarsen opened 4 years ago

patricialarsen commented 4 years ago

There appears to be under-damping of the BAO signal in the correlation_3d function for halofit. The attached plot shows the comparison between linear, halofit and cosmic emu results from ccl using the code snippet below. (Note that I didn't explictly set m_nu to zero here, but doing this doesn't substantially change the result)

Screen Shot 2020-08-07 at 5 46 55 PM

import pyccl import numpy as np import matplotlib.pyplot as plt

cosmo = pyccl.Cosmology(transfer_function='boltzmann_camb', matter_power_spectrum='linear', Omega_c=0.26067, Omega_b=0.02242/0.67662,h=0.6766, n_s=0.9665, sigma8=0.8102) cosmo2 = pyccl.Cosmology(transfer_function='boltzmann_camb', matter_power_spectrum='halofit', Omega_c=0.26067, Omega_b=0.02242/0.67662,h=0.6766, n_s=0.9665, sigma8=0.8102) cosmo3 = pyccl.Cosmology(transfer_function='boltzmann_camb', matter_power_spectrum='emu', Omega_c=0.26067, Omega_b=0.02242/0.6766**2,h=0.6766, n_s=0.9665, sigma8=0.8102, Neff = 3.04)

r = np.linspace(0.0,200.,1000) corr_lin = pyccl.correlation_3d(cosmo,1.0,r/0.6766) corr_halofit = pyccl.correlation_3d(cosmo2,1.0,r/0.6766) corr_emu = pyccl.correlation_3d(cosmo3,1.0,r/0.6766)

plt.figure() plt.plot(r,corr_lin*r2,label="linear") plt.plot(r,corr_halofit*r*2,'--',label="halofit") plt.plot(r,corr_emur2,'-.',label="emu") plt.legend() plt.xlabel('r Mpc/h') plt.ylabel('r^2 zeta_mm (r) Mpc/h ^2') plt.legend() plt.show()

patricialarsen commented 4 years ago

Note that this may be a halofit model limitation rather than a CCL issue @beckermr and I are looking into this to confirm

c-d-leonard commented 4 years ago

@patricialarsen - It looks like this is an issue that occurs with halofit in general rather than CCL. I'm not sure we have any immediate fix available.

beckermr commented 4 years ago

This is what we found too. I am going to close this issue for now.

jablazek commented 4 years ago

I'm re-opening this and assigning it to myself. FAST-PT has a resummation method built in (from Ivanov) to do BAO damping at 1loop PT. Exposing this should be straightforward. Generalizing this to damp the halofit BAO is more complicated, but is a good stretch goal.

Note: This issue will require progress on #815

tilmantroester commented 4 years ago

For a more ad-hoc approach, the new HMCode uses a perturbation-theory inspired fitting function (Eq. 14 in https://arxiv.org/pdf/2009.01858.pdf).

damonge commented 2 years ago

@jablazek should this still be open?

jablazek commented 2 years ago

@damonge : Good question. I have not exposed the FAST-PT functionality to PTTracers. However, as @tilmantroester notes, there are now more modern approaches which might be better. Is the HMCode method already available in CCL? If so, maybe that is sufficient?

damonge commented 2 years ago

We can access hmcode via CAMB. It's not ideal, but if we'd rather aim for that than expose the fastpt functionality, we can close this issue and open an HMCode-specific one (or keep both open!)

jablazek commented 2 years ago

Keep this open for now. I have a few fast-pt -> CCL housekeeping tasks to do.

nikfilippas commented 1 year ago

Tagging this as a v3 milestone since it's time we updated the old halofit option with a more modern version like the one implemented in HMCode.

nikfilippas commented 1 year ago

Removed it from v3 milestones because it will work much better after #1063 .