How does CosmoMC calculate fsigma8?

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
yajing huang
Posts: 9
Joined: January 21 2015
Affiliation: Johns Hopkins University

How does CosmoMC calculate fsigma8?

Post by yajing huang » February 18 2016

Hi,

I was trying to use the constraints on fsigma8 given by various redshift surveys as a prior for running chains. And I was wondering about how fsigma8 is calculated in CosmoMC. I looked into the source code and it seems like it is done through some kind of interpolation. But I can't figure out what it is interpolated from.

I used the following Python code to calculate fsigma8(z) as a function of Omegam and sigma8(z=0) at each chain step to see if it agrees with the one calculated by CosmoMC.

--------------------------------------------------

Code: Select all

import numpy as np
from scipy.special import hyp2f1
from scipy.misc import derivative
import matplotlib.pyplot as plt


z=0.067
omegam,sigma8,fsig8=np.loadtxt('../6DFGS_fsg8.txt',unpack=True)
fs8=np.zeros(len(omegam))

for i in range(len(omegam)):
 def delta(z):
  return hyp2f1(1/3.0,1.0,11/6.0,(omegam[i]-1)/(omegam[i]*(1+z)**3))/(1+z)


 f=-(1+z)/delta(z)*derivative(delta,z,dx=1e-5)
 sig8z=sigma8[i]*delta(z)/delta(0.0)

 fs8[i]=f*sig8z

ratio=fsig8/fs8

plt.plot(np.arange(len(omegam)),ratio)
plt.show()
---------------------------------------------

the file "6DFGS_fsg8.txt" contains the values of omegam, sigma8(z=0) and fsigma8(z=0.067) at each chain step.

I varied the redshift from as small as 0.067 to 0.8 to see how the agreement/disagreement depends on redshift.

I found that at z=0.8 my version of fsigma8 agreed with CosmoMC's to within 1%, while at z=0.067 and z=0.57, the discrepancy is about 5% (which is significant considering that the uncertainty given by redshift surveys is about 10%).

It would be great if anyone knows how CosmoMC does the calculation or whether there is error in my code.


Thanks a bunch,

Yajing

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

Re: How does CosmoMC calculate fsigma8?

Post by Antony Lewis » February 18 2016

See Sec 5.5.1 of the 2015 Planck parameters paper (1502.01589) for a description of how things are defined. Also note that CosmoMC by default includes one massive neutrino (as in the Planck analysis).

yajing huang
Posts: 9
Joined: January 21 2015
Affiliation: Johns Hopkins University

How does CosmoMC calculate fsigma8?

Post by yajing huang » February 22 2016

Thank you, Antony, for the reply. However, the issue is not resolved even if setting the neutrino mass to be zero. In subroutine CAMBCalc_SetPkFromCAMB from Calculator_CAMB.f90, growth_z is only calculated at 2 redshift (at 0, and z_output) with nz=CP%Transfer%PK_num_redshifts=2 by default. And I found by plotting a range of growth_z at different z that the interpolation is basically just a straight line.
For my purpose I need the accurate values of growth_z at several redshifts. Is there a way to tell CosmoMC to compute them?

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

Re: How does CosmoMC calculate fsigma8?

Post by Antony Lewis » February 22 2016

Yes, your likelihood has to tell CosmoMC what redshifts it needs, e.g. see bao.f90 which does this:

Code: Select all

    this%needs_powerspectra =  any(this%type_bao == f_sigma8)

    if (this%needs_powerspectra) then
        this%needs_exact_z =  .true.
        allocate(this%exact_z(this%num_bao))
        this%exact_z = this%bao_z
    end if

Post Reply