Page 1 of 1

CAMB: transfer function for gamma at z~100

Posted: January 01 2016
by Kyungjin Ahn
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]

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

Posted: January 04 2016
by Antony Lewis
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

CAMB: transfer function for gamma at z~100

Posted: January 05 2016
by Kyungjin Ahn
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