CAMB: halofit matter power spectrum derivative

 Posts: 7
 Joined: February 03 2017
 Affiliation: The Ohio State University
CAMB: halofit matter power spectrum derivative
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:
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?
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:
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?

 Posts: 1378
 Joined: September 23 2004
 Affiliation: University of Sussex
 Contact:
Re: CAMB: halofit matter power spectrum derivative
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.

 Posts: 7
 Joined: February 03 2017
 Affiliation: The Ohio State University
CAMB: halofit matter power spectrum derivative
Ok, I see that increasing set_accuracy does decrease the width of the spike, as expected. Thanks!

 Posts: 1378
 Joined: September 23 2004
 Affiliation: University of Sussex
 Contact:
Re: CAMB: halofit matter power spectrum derivative
You can change just the k sampling by setting k_per_logint using set_matter_power.

 Posts: 7
 Joined: February 03 2017
 Affiliation: The Ohio State University
CAMB: halofit matter power spectrum derivative
Oh, awesome. I hadn't realized that was different from setting npoints.