CAMB: transfer function for gamma at z~100

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Kyungjin Ahn
Posts: 4
Joined: May 02 2008
Affiliation: Chosun University
Contact:

CAMB: transfer function for gamma at z~100

Post by Kyungjin Ahn » January 01 2016

Pardon me if this has been addressed before. I'm using January 2015 version of CAMB, and wanted to use the 4th column (photon density perturbation) of transfer function outputs at various redshifts. I set
transfer_kmax = 20
transfer_k_per_logint = 100
in the parameter file.

With redshifts selected as in the figure file(1000, 203, 101), the transfer function has discontinuous points at z=203 and 101 which looks suspicious. I ran it both with intel-fortran compiled and gfortran-compiled ones with the same result.

As a test I went back to September 2013 version, and the same outputs for the same redshifts have null values for the transfer function at k>~0.02, so it used to be worse.

Is it a glitch from error accumulation of the ODE solver used?

Image[/b]

Antony Lewis
Posts: 1941
Joined: September 23 2004
Affiliation: University of Sussex
Contact:

Re: CAMB: transfer function for gamma at z~100

Post by Antony Lewis » January 04 2016

By default it doesn't calculate the radiation multipoles accurately at late times, the glitches may be the sudden switch to the approximate solution. You can turn off DoLateRadTruncation and increase lAccuracyBoost if you want to get it more accurately, e.g. (in latest CAMB with python wrapper)

Code: Select all

options=[{},{'DoLateRadTruncation':False},{'DoLateRadTruncation':False, 'lAccuracyBoost':4}]
_, axs = plt.subplots(1,3, figsize=(12,4))
for option, ax in zip(options, axs):
    pars = camb.CAMBparams()
    pars.set_cosmology(H0=67.5, ombh2=0.022, omch2=0.122)
    pars.InitPower.set_params(ns=0.965)
    pars.set_matter_power(redshifts=[1000, 203, 10], kmax=0.2, k_per_logint=100)
    pars.WantCls = False
    pars.NonLinear = model.NonLinear_none

    pars.set_accuracy(**option)

    results = camb.get_results(pars)

    M = results.get_matter_transfer_data()
    for i in range(3):
        tz = M.transfer_z('delta_photon',i)
        ax.plot(M.q, tz*M.q**2)
    ax.set_xlim([0,0.1])
gives
Image

Kyungjin Ahn
Posts: 4
Joined: May 02 2008
Affiliation: Chosun University
Contact:

CAMB: transfer function for gamma at z~100

Post by Kyungjin Ahn » January 05 2016

Thank you so much, Antony. Not having the proper gfortran version for python wrapper, I just followed your instruction inside the usual input file. Now the figure is what I have with
do_late_rad_truncation = F
l_accuracy_boost = 3
which looks natural, and I'll test convergence of l_accuracy_boost later.

Image

Post Reply