Open mShuntov opened 3 years ago
Hi @mShuntov
have you tried
Hi @mShuntov ,
We have cross-checked CCL with other libraries (NumCosmo and Colossus), and we verified that just the analytic NFW projected functions present good match (the relative difference varies 10^{-11} to 10^{-6}). Computing the projected density numerically (NFW, Einasto or Hernquist profiles) we obtain 10% agreement for some R values.
So, for now, you should use the "analytic" NFW profile:
prof_M_NFW = ccl.halos.profiles.HaloProfileNFW(c_M, fourier_analytic = True, projected_analytic = True, cumul2d_analytic = True, truncated = False)
I ran your notebook using it, but the difference between data and the predicted curve is even bigger.
Hi,
Thanks for the suggestions.
Indeed, changing the range of the parameters controlling the splines and numerical accuracy
cosmo.cosmo.spline_params.ELL_MAX/MIN_CORR
and cosmo.cosmo.spline_params.N_ELL_CORR
fixed this behaviour. Previously I was only changing the definitions of the l_arr
The Bessel integrator crashes with a CCLError: Error 18:
message and I can't pin down what causes it.
Regarding the profiles, pyccl.halos.profiles.HaloProfile
object has a method to update precision parameters used by the FFTLog to compute Hankel transforms.
I've been trying to tweak this but I don't see any change. This is the syntax I used:
prof_M_NFW.update_precision_fftlog( padding_lo_fftlog = 0.01,
padding_lo_extra = 0.01,
padding_hi_fftlog = 100.,
padding_hi_extra = 100.,
large_padding_2D = False,
n_per_decade = 1000,
extrapol = 'linx_liny',
plaw_fourier = -1.5,
plaw_projected = -1.)
Is this the wrong way of doing it?
Finally, usually, the correlation measurements are done using some cuts in the stellar mass of the lensing sample of galaxies. Is there a way to inform the model that we're interested in a certain stellar mass range; or is this governed by the HOD parameterization that is defined in the HaloProfileHOD
class?
Hi @mShuntov ,
We have cross-checked CCL with other libraries (NumCosmo and Colossus), and we verified that just the analytic NFW projected functions present good match (the relative difference varies 10^{-11} to 10^{-6}). Computing the projected density numerically (NFW, Einasto or Hernquist profiles) we obtain 10% agreement for some R values.
So, for now, you should use the "analytic" NFW profile:
prof_M_NFW = ccl.halos.profiles.HaloProfileNFW(c_M, fourier_analytic = True, projected_analytic = True, cumul2d_analytic = True, truncated = False)
I ran your notebook using it, but the difference between data and the predicted curve is even bigger.
Hi,
I'm coming back to you regarding this issue. In fact when requesting a non-truncated NFW profile
prof_M_NFW = ccl.halos.profiles.HaloProfileNFW( c_M,
fourier_analytic = True,
projected_analytic = False,
cumul2d_analytic = False,
truncated = False)
there appears a big difference in the predicted cross-correlation function between two samples of galaxies at different redshifts, whereas the auto-correlation of galaxies in the lower redshift bin doesn't change.
I'm attaching some figures showing this difference.
Could you tell if this is due to wrong usage of the code, or is it some bug? The piece of code I'm using is the same as the one I posted earlier.
Thanks.
Hi CCL team,
Thanks for developing and maintaining this exceptionally powerful and versatile code. I am using it in my work in order to fit auto and cross-correlation measurements. My data are measurements of the 2pt angular correlation function for two samples of galaxies: lens sample (z = 1.15) and source sample (z=3.35). I am measuring the auto-correlation of lenses (due to clustering) and the cross-correlation between lenses and sources (due to magnification, because no z-overlap between the samples).
The goal is to fit these measurements using the halo model and an HOD parameterization (following Nicola et al. 2019 parameterizations).
In writing the code to perform this, I am closely following the examples given here. However, the predictions I get from the CCL (using the default parameter values for the HOD, and for most other parameters controlling the numerical performance of the code) show unstable behaviour and fail to agree with the measurements. The figure below shows the lens-lens auto-correlation measurements (blue) and lens-source cross-correlation measurements (orange) along with the CCL predictions using the HOD power spectrum (solid) and a default 'boltzmann_camb' power spectrum.
I fail to understand what causes the wiggles in the correlation function and the offset and shape compared to the data. This behaviour prevents successfully fitting the data.
I have been tweaking many of the parameters that possibly drive this behaviour (the arrays holding values of the scale factor, wavenumber k, multipole l, etc), but in combination with the parameters controlling the numerical performance the degree of freedom to tweak these is huge.
I would be grateful if you would be interested to have a look at this problem and develop some discussion about what drives this discrepancy between the model and my data.
In the meanwhile, I keep going investigating all the parameters that control the splines, fftlog precision, integration accuracy etc.
Thank you!
For completeness, I am sharing with you the notebook that performs these computations.
Load data. The data are measurements of correlation (due to clustering) between galaxies at redshift of ~1.15 (lenses) and cross-correlation (due to magnification) between lenses and galaxies at high redshift of ~3.35 (lenses)
Define global variables and parameter values
Define sample-specific values
Define the two tracers we're studying: galaxy number counts of lenses and sources
Define HOD/CCL relevant quantities: halo mass definition, concentration-mass relation, mass function, halo bias, NFW profile...
Define halo profile characterizing the galaxy overdensity using a Halo Occupation Distribution (HOD) model
Define the 2pt correlator for the HOD halo profile
Define functions that get predictions for the correlation function and power spectra to get model of cross-correlation due to magnification we use the galaxy-matter power spectrum; for auto-correlations due to clustering we use the galaxy-galaxy power spectrum
Next, we want to compare with predictions using the default camb power spectrum. Here we define a galaxy bias
Plotting