Primordial Power Spectrum¶
Class providing the primordial power spectrum. The late-time power spectrum is typically computed from the specified primordial power spectrum and the transferFunction and normalized to a value of \(\sigma_8\).
Default implementation: powerSpectrumPrimordialPowerLaw
Methods¶
power→double precisionReturn the (unnormalized) power in the primordial power spectrum at the given
wavenumber(specified in units of Mpc\(^{-1}\)).double precision, intent(in ) :: wavenumber
logarithmicDerivative→double precisionReturn the logarithmic derivative with respect to wavenumber of the primordial power spectrum at the given
wavenumber(specified in units of Mpc\(^{-1}\)).double precision, intent(in ) :: wavenumber
powerSpectrumPrimordialCosmologicalCube¶
A primordial power spectrum class which truncates a primordial power spectrum into a cosmological simulation cube. Specifically, it assumes that wave-vectors with all components (\(k_x,k_y,k_z\)) smaller than \(\Delta k = 2 \pi f / L\), where \(L=\)[lengthCube] is the simulation cube length, and \(f=\)wavenumberMinimumFactor specifies the minimum wavenumber (in units of \(2 \pi / L\)) to which the power spectrum is integrated, are missing from the power spectrum. For wavenumbers of magnitude \(k\) the fraction of power missed due to these missing wavenumbers is computed. The total power at that wavenumber is then reduced by that amount.
The fractional suppression in power, \(f(x)\), as a function of \(x=k/\Delta k\) is given by:
For the \(1 < x \le \sqrt{2}\) the solution is found by considering the 6 spherical caps of the sphere which protrude from the faces of the cube. The solution for \(\sqrt{2} < x \le \sqrt{3}\) is more complicated and follows the solution given by achille hui (https://math.stackexchange.com/users/59379/achille-hui) (2013).
Parameters
[lengthCube](real) — The length of the cosmological cube.[wavenumberMinimumFactor](real; default0.5d0) — The minimum wavenumber (in units of \(2 \pi / L\)) to which the power spectrum is integrated.
powerSpectrumPrimordialPiecewisePowerLaw¶
Implements a piecewise power-law primordial power spectrum, possibly with a running index. The primordial power spectrum has the form:
where
where \(n_\mathrm{s,i}=\)[index] is the power spectrum index at wavenumber \(k_\mathrm{ref,i}=\)[wavenumberReference], \(\d n / \d \ln k_i=\)[running], and \(\d^2 n / \d \ln k^2_i=\)[runningRunning] describes the running of this index with wavenumber. The subscript “i”, which runs from \(1\) to \(N\) refers to each interval of the piecewise power-law. Note that \(k_\mathrm{ref,i}\) is defined only for \(i\ge 2\). For the first (\(i=1\)) interval, the wavenumber ranges from \(0\) to \(k_\mathrm{ref,2}\).
The amplitudes, \(A_i\), are chosen to make the power spectrum continuous.
Methods
indexEffective— Compute the local effective index of the power spectrum.indices— Compute the indices corresponding to the given wavenumber.
Parameters
[index](real; default[0.9649d0,0.9649d0]) — The index of the power-law primordial power spectrum.[running](real; default[0.0d0,0.0d0]) — The running, \(\d n_\mathrm{s} / \d \ln k\), of the power spectrum index.[runningRunning](real; default[0.0d0,0.0d0]) — The running-of-the-running, \(\d^2 n_\mathrm{s} / \d \ln k^2\), of the power spectrum index.[wavenumberReference](real; default[1.0d0]) — When a running power spectrum index is used, this is the wavenumber, \(k_\mathrm{ref}\), at which the index is equal to[index].
powerSpectrumPrimordialPowerLaw¶
Implements a power-law primordial power spectrum, possibly with a running index. The primordial power spectrum has the form:
where
where \(n_\mathrm{s}=\)[index] is the power spectrum index at wavenumber \(k_\mathrm{ref}=\)[wavenumberReference], \(\d n / \d \ln k=\)[running], and \(\d^2 n / \d \ln k^2=\)[runningRunning] describes the running of this index with wavenumber.
(Default implementation)
Parameters
[index](real; default0.9649d0) — The index of the power-law primordial power spectrum.[running](real; default0.0d0) — The running, \(\d n_\mathrm{s} / \d \ln k\), of the power spectrum index.[runningRunning](real; default0.0d0) — The running-of-the-running, \(\d^2 n_\mathrm{s} / \d \ln k^2\), of the power spectrum index.[wavenumberReference](real; default1.0d0) — When a running power spectrum index is used, this is the wavenumber, \(k_\mathrm{ref}\), at which the index is equal to[index].[runningSmallScalesOnly](boolean; default.false.) — Iftruethen the index runs only for \(k > k_\mathrm{ref}\), for smaller \(k\) the index is constant.