Page 1 of 1

CAMB: halofit matter power spectrum derivative

Posted: September 29 2017
by Matthew Digman
Hey,
I was running a test involving python camb 0.1.6.1's Takahashi halofit matter power spectrum, and I notice that there is a large spike around kh=0.005 h Mpc^-1 in the second derivative of the matter power spectrum with respect to k, shown here: Image

I assume the spike itself is because the implementation of halofit switches to using the linear power spectrum for kh below Min_kh_nonlinear = 0.005, which creates a discontinuity, but I would not expect that to produce an extended feature like this, unless something is smoothing it out. Is camb applying a smoothing to the halofit output, or is this feature something else?

Re: CAMB: halofit matter power spectrum derivative

Posted: September 29 2017
by Antony Lewis
It depends on what function you are using. You can either get the raw k sampling, or a spline object which does bicubic spline interpolation on P(k,z) over the sampled points. The raw k sampling may not be very fine by default.

CAMB: halofit matter power spectrum derivative

Posted: September 29 2017
by Matthew Digman
Ok, I see that increasing set_accuracy does decrease the width of the spike, as expected. Thanks!

Re: CAMB: halofit matter power spectrum derivative

Posted: September 29 2017
by Antony Lewis
You can change just the k sampling by setting k_per_logint using set_matter_power.

CAMB: halofit matter power spectrum derivative

Posted: September 30 2017
by Matthew Digman
Oh, awesome. I hadn't realized that was different from setting npoints.