[COBAYA] Modifying interface between CAMB and HALOFIT

 Posts: 7
 Joined: March 21 2016
 Affiliation: Leinweber Center for Theoretical Physics, University of Michigan
 Contact:
[COBAYA] Modifying interface between CAMB and HALOFIT
Hi,
I want to use cobaya for cosmological inference from some largescale galaxy survey(s), with a modification: the model we consider introduces parameter(s) whose functions scale the linear matter powerspectrum P(k,z).
I know that CAMB solves for the linear Bolztman equations for the density perturbations in each component of the fluid, but I'm not sure what it passes to HALOFIT exactly. If it passes the linear matter powerspectrum and that is all required by HALOFIT, presumably I should be able to "catch" the linear matter powerspectrum, before it is passed to HALOFIT, and modify that part of the code, correct? If yes, where should I attempt this? If no, what is the potential pitfall(s)? Many thanks!
I want to use cobaya for cosmological inference from some largescale galaxy survey(s), with a modification: the model we consider introduces parameter(s) whose functions scale the linear matter powerspectrum P(k,z).
I know that CAMB solves for the linear Bolztman equations for the density perturbations in each component of the fluid, but I'm not sure what it passes to HALOFIT exactly. If it passes the linear matter powerspectrum and that is all required by HALOFIT, presumably I should be able to "catch" the linear matter powerspectrum, before it is passed to HALOFIT, and modify that part of the code, correct? If yes, where should I attempt this? If no, what is the potential pitfall(s)? Many thanks!

 Posts: 27
 Joined: July 18 2005
 Affiliation: University of Michigan
 Contact:
Re: [COBAYA] Modifying interface between CAMB and HALOFIT
Let me try to rephrase the question a bit (Minh and I are working together):
We would like to "forcefeed" CAMB to use the linear power spectrum P(k, z) with the growth index [f = Om(a)^gamma, and corresponding D(z) which I know in general is zdependent but we will ignore that here]. One way to do this is to write
P(k, z) = P(k, 0) / [P(k, z)/P(k, 0)] * growth^2
where 'growth' is D(z) given with the gamma thing. So, divide by the true growth and multiply by the growthindex approx.
That said, in which place is the linear power reported and passed on to other functions (that compute, e.g., lensing observables)? It seems that this would be the best place to implement the above.
We would like to "forcefeed" CAMB to use the linear power spectrum P(k, z) with the growth index [f = Om(a)^gamma, and corresponding D(z) which I know in general is zdependent but we will ignore that here]. One way to do this is to write
P(k, z) = P(k, 0) / [P(k, z)/P(k, 0)] * growth^2
where 'growth' is D(z) given with the gamma thing. So, divide by the true growth and multiply by the growthindex approx.
That said, in which place is the linear power reported and passed on to other functions (that compute, e.g., lensing observables)? It seems that this would be the best place to implement the above.

 Posts: 1812
 Joined: September 23 2004
 Affiliation: University of Sussex
 Contact:
Re: [COBAYA] Modifying interface between CAMB and HALOFIT
TNonLinearModel classes are passed MatterPowerData structure with linear information. But halofit does also use cosmological parameters directly.

 Posts: 1812
 Joined: September 23 2004
 Affiliation: University of Sussex
 Contact:
Re: [COBAYA] Modifying interface between CAMB and HALOFIT
Note that CMB lensing is computed directly from the potentials outside limber approximation.
Otherwise, you can probably just change the code where it computes the linear matter power spectra.
Otherwise, you can probably just change the code where it computes the linear matter power spectra.