LSSTDESC / firecrown

DESC Cosmology Likelihood Framework
BSD 3-Clause "New" or "Revised" License
29 stars 7 forks source link

Cobaya CCL connector: increase a_bg range to support sampling w0 and wa #270

Open heatherprince opened 1 year ago

heatherprince commented 1 year ago

When varying w0 and wa I got an error using the default minimum scale factor of 0.1, or even a smaller scale factor down to 5e-4 (pyccl.errors.CCLError: Comoving distance spline does not cover sufficiently high redshifts for HALOFIT. HALOFIT translates (w0, wa) to a w0_eff. This requires computing the comoving distance to the CMB, which requires the background splines being sampled to sufficiently high redshifts. If using the calculator mode, check the support of the background data.)

If I made the minimum scale factor too small, e.g. 1e-4, I got a different error (pyccl.errors.CCLError: Error CCL_ERROR_SPLINE: ccl_background.c: ccl_cosmology_compute_growth(): Error creating D(a) spline))

It ran without errors for a minimum a_bg of 2e-4, (zmax ~5000), so fixing it might be as simple as just changing the default a_bg range, but given the weird amount of tuning I had to do to get it to run without errors I'm not sure if the theory power spectra are reliable, and it would probably be good to check this with someone more familiar with ccl.

vitenti commented 11 months ago

Hello @damonge , when creating a pyccl cosmology using the calculator mode, we pass the arrays computed in the user defined intervals.