## Cobaya: theory module camb - getting growth D(z) and growth rate f(z)

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Chen Heinrich
Posts: 5
Joined: October 06 2018
Affiliation: Caltech

### Cobaya: theory module camb - getting growth D(z) and growth rate f(z)

Hi, I am writing a new theory class with Cobaya where I need the following ingredients:

1) D(z) (normalized to z = 0 or 1/(1+z) at matter domination)
2) f(z) for calculating the RSD parameter

I wonder what's the best way of getting them from the camb theory module in cobaya?
1) Would sigma8(z)/sigma8(z=0) suffice to get the unnormalized D(z) or are there caveats around doing that? In particular, I found that he following code could work for getting sigma8(z) but maybe there are dangers with going into the matter transfer data by had (e.g. z is flipped)? If so, would using the Cobaya interface self.provider.get_sigma_R() be the preferred option? Also, if there is a way to directly get D(z), that's probably preferable.

Code: Select all

params, results = self.provider.get_CAMB_transfers()
data = results.get_matter_transfer_data()
sigma8 = np.flip(data.sigma_8)
sigma8_z0 = self.provider.get_param('sigma8’)
D = sigma8 / sigma8_z0

where provider here is the camb module.

2) The closest thing I can come up with is f = fsigma8(z)/sigma8(z) where get_fsigma8() is provided by the theory module camb and sigma8(z) like above. But I wonder if that's safe and if there is a more direct way to get f(z). Thank you!

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

### Re: Cobaya: theory module camb - getting growth D(z) and growth rate f(z)

To get D(z) you need to define it first - it is not a well defined quantity since different matter species grow at different rates at different scales in general (e.g with massive neutrinos, which there always are). But yes, you could use sigma_R as an effective definition.

The fsigma8 functions follow the conventions in the Planck 2018 paper to define an effective RSD f(z), and indeed the best thing to do if you want to use those definitions.

Chen Heinrich
Posts: 5
Joined: October 06 2018
Affiliation: Caltech

### Re: Cobaya: theory module camb - getting growth D(z) and growth rate f(z)

Hi Antony, thank you for your reply.

1) It turns out that getting sigma8(z) would suffice for the purposes I'm using them for. I also realized during testing that a faster way to get sigma8 array is perhaps:

Code: Select all

sigma8 = np.flip(self.provider.get_CAMBdata().get_sigma8())
However, I did find out that if I don't request z = 0, then the derived parameter 'sigma8' (same as that from self.provider.get_param('sigma8')) gives the sigma8(z = zmin) which is not necessarily at z = 0. I would suggest adding a note to the documentation, because I didn't realize that until looking at the source code.

2) Great thank you so much! I will get f this way then!