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

powerdouble precision

Return the (unnormalized) power in the primordial power spectrum at the given wavenumber (specified in units of Mpc\(^{-1}\)).

  • double precision, intent(in ) :: wavenumber

logarithmicDerivativedouble precision

Return 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:

\[\begin{split}f(x) = \left\{ \begin{array}{ll} 0 & \hbox{ for } x \le 1, \\ 3(1-x^{-1}) & \hbox{ for } 1 < x \le \sqrt{2}, \\ 3 x{-1} [ 1 + 2 \pi^{-1} x \sin^{-1}(\{x^2-1\}^{-1}) - 4 \pi^{-1} x \sin^{-1}(\{1-x^2\}^{-1/2}) ] & \hbox{ for } \sqrt{2} < x \le \sqrt{3}, \\ 1 & \hbox{ for } \sqrt{3} < x. \end{array} \right.\end{split}\]

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] — The length of the cosmological cube.

  • [wavenumberMinimumFactor] (default 0.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:

\[P(k) \propto A_\mathrm{i} k^{n_\mathrm{eff,i}(k)},\]

where

\[n_\mathrm{eff,i}(k) = n_\mathrm{s,i} + {1\over 2}{\d n \over \d \ln k}_i \ln \left( {k \over k_\mathrm{ref,i}} \right) + {1\over 6}{\d^2 n \over \d \ln k^2}_i \left[ \ln \left( {k \over k_\mathrm{ref}} \right) \right]^2,\]

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] (default [0.9649d0,0.9649d0]) — The index of the power-law primordial power spectrum.

  • [running] (default [0.0d0,0.0d0]) — The running, \(\d n_\mathrm{s} / \d \ln k\), of the power spectrum index.

  • [runningRunning] (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] (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:

\[P(k) \propto k^{n_\mathrm{eff}(k)},\]

where

\[n_\mathrm{eff}(k) = n_\mathrm{s} + {1\over 2}{\d n \over \d \ln k} \ln \left( {k \over k_\mathrm{ref}} \right) + {1\over 6}{\d^2 n \over \d \ln k^2} \left[ \ln \left( {k \over k_\mathrm{ref}} \right) \right]^2,\]

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

  • [exponent] (default 1.73d0) — Exponent of the differential luminosity function.

  • [rateHydrogenIonizingPhotonsMinimum] (default 1.0d48) — The minimum ionizing photon production rate (\(Q_\mathrm{H,min}\), in photons/s) below which the power-law HII region luminosity function is truncated to zero.

  • [rateHydrogenIonizingPhotonsMaximum] (default huge(0.0d0)) — The maximum ionizing photon production rate (\(Q_\mathrm{H,max}\), in photons/s) above which the power-law HII region luminosity function is truncated to zero.

  • [exponent] (default 1.0d0) — Halo masses will be (pseudo-)uniformly distributed in \([\log(M)]^{1/(1+\alpha)}\) where \(\alpha=\)exponent.

  • [wavelengthMinimum] — The minimum wavelength (in units of AA) for the power-law spectrum.

  • [wavelengthMaximum] — The maximum wavelength (in units of AA) for the power-law spectrum.

  • [exponent] — The exponent of the power-law spectrum.

  • [normalization] — The normalization (in units of \(L_\odot / \AA\)) of the power-law spectrum.

  • [normalization] — Parameter \(\sigma_{12}\) appearing in model for random errors in the halo mass function.

  • [fractionalErrorHighMass] — Parameter \(\sigma_\infty\) appearing in model for random errors in the halo mass function.

  • [exponent] — Parameter \(\gamma\) appearing in model for random errors in the halo mass function. Specifically, the fractional error is given by \(\sigma(M) = \left[ \sigma^2_{12} \left({M_\mathrm{halo} \over 10^{12}\mathrm{M}_\odot}\right)^{2\gamma} + \sigma^2_\infty \right]^{1/2}\), where \(\sigma_{12}=\)[normalization] and \(\gamma=\)[exponent].

  • [correlationModelTrivial] (default .true.) — If true, the correlation between mass errors of pairs of halos is unity for halos with identical mass and time, and zero otherwise. If false, a power-law correlation model in mass ratio and expansion factor ratio is used instead.

  • [correlationNormalization] (default 0.0d0) — Variable \(C_0\) in the model for the correlation between halo mass errors: \(C_{12} = C_0 [M_2/M_1]^\alpha [(1+z_2)/(1+z_1)]^\beta\).

  • [correlationMassExponent] (default 0.0d0) — Variable \(\alpha\) in the model for the correlation between halo mass errors: \(C_{12} = C_0 [M_2/M_1]^\alpha [(1+z_2)/(1+z_1)]^\beta\).

  • [correlationRedshiftExponent] (default 0.0d0) — Variable \(\beta\) in the model for the correlation between halo mass errors: \(C_{12} = C_0 [M_2/M_1]^\alpha [(1+z_2)/(1+z_1)]^\beta\).

  • [radiusLow] (default +0.0154d0) — The low-mass limit of the characteristic scale radius \(r_0\) (in Mpc) in the power-law scale radius model, giving the scale radius normalization for low-mass halos as a function of peak height and expansion factor.

  • [radiusHigh] (default +0.0962d0) — The high-mass limit of the characteristic scale radius \(r_1\) (in Mpc) in the power-law scale radius model, giving the scale radius normalization for high-mass halos.

  • [radiusTransition] (default +1.2137d0) — The peak height \(\nu\) at which the characteristic scale radius transitions between its low-mass and high-mass limiting values in the power-law scale radius model.

  • [radiusWidth] (default +0.5482d0) — The parameter \(\Delta r\) in the power-law scale radius model.

  • [massLow] (default +0.3895d0) — The parameter \(\alpha_0\) in the power-law scale radius model.

  • [massHigh] (default +0.2984d0) — The parameter \(\alpha_1\) in the power-law scale radius model.

  • [massTransition] (default -0.2583d0) — The parameter \(\alpha_\nu\) in the power-law scale radius model.

  • [massWidth] (default +16.6050d0) — The parameter \(\Delta \alpha\) in the power-law scale radius model.

  • [expansionFactorLow] (default -0.6977d0) — The parameter \(\beta_0\) in the power-law scale radius model.

  • [expansionFactorHigh] (default +0.7972d0) — The parameter \(\beta_1\) in the power-law scale radius model.

  • [expansionFactorTransition] (default +0.5395d0) — The parameter \(\beta_\nu\) in the power-law scale radius model.

  • [expansionFactorWidth] (default +0.4282d0) — The parameter \(\Delta \beta\) in the power-law scale radius model.

  • [scatter] (default +0.1513d0) — The scatter (in dex) in the scale radius at fixed halo mass and redshift in the power-law scale radius model, representing the intrinsic halo-to-halo variation in concentration.

  • [index] (default 0.9649d0) — The index of the power-law primordial power spectrum.

  • [running] (default 0.0d0) — The running, \(\d n_\mathrm{s} / \d \ln k\), of the power spectrum index.

  • [runningRunning] (default 0.0d0) — The running-of-the-running, \(\d^2 n_\mathrm{s} / \d \ln k^2\), of the power spectrum index.

  • [wavenumberReference] (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].

  • [runningSmallScalesOnly] (default .false.) — If true then the index runs only for \(k > k_\mathrm{ref}\), for smaller \(k\) the index is constant.