Bases: object
Class for linear perturbations field objects. Usage example: fields.delta(5) returns the dark matter density perturbation at the 5th time step
a(a_index): scale factor [1]
d_t: time step in ln(a) units (one fewer value than ln(a) [1]
Bases: LinearPerturbationBase
Class for computing linear perturbations by solving the Einstein-Boltzmann ODE system.
The Boltzmann solver is selected using the set function:
cosmo.set(pk_type = "boltz")
Computes the primordial power spectrum of gauge invariant curvature perturbations (R)
k – wavenumber \([1/Mpc]\)
P_R(k), primordial power spectrum of R
Solves the Einstein-Boltzmann ODE system for the evolution of the linear order perturbation of the fields.
k – wavenumber \([h/Mpc]\)
grid – ln(a) values at which to output fields [1]
sec_factor – relaxes row permutation criterium in optimized LUP solver
keep_lna0 – if True includes the fields at initial time a_0
initial_conditions – can pass a_0, y_0 (vector of initial conditions)
enable_fast_solver – if set to False always use standard LUP solver for full matrix
enable_sparse_lu_solver – if set to True: avoid iterating over known zero-entries in fallback LUP solver
Linear order perturbations, accessed with fields.a, fields.Phi etc.
Returns the linear growth factor computed from the Boltzmann solver at a given k value.
a – scale factor [1]
k – wavenumber used to compute the growth factor (default:k=1 \(Mpc^{-1}\)) [\(Mpc^{-1}\)]
D(a): growth factor normalised to 1 at a=1 [1]
computes max redshift for which this model is applicable. uses the implemented initial conditions to determine this.
k – wavenumber k [\(h Mpc^{-1}\)]
redshift
Returns the linear total matter power spectrum computed from the Boltzmann solver, this includes cold dark matter, baryons and massive neutrinos for an array of a and k values.
a – scale factor [1] (default:a=1)
k – wavenumber used to compute the power spectrum (default:k=1 Mpc^1) [Mpc^-1]
diag_only – if set to True: compute powerspectrum for pairs \(a_i, k_i\), else consider all combinations \(a_i, k_j\)
Warning
If pk_norm_type = ‘A_s’ this will compute the total matter power spectrum following the general relativistic treatment (using delta_m_tot). If pk_norm_type = ‘deltah’ the Poisson equation will be assumed and the evolution will be split in growth factor and transfer function. We recommend the use of A_s or sigma8 normalizations.
P(a,k): total matter power spectrum [\(Mpc^3\)]
Returns the linear matter power spectrum of cold dark matter and baryons computed from the Boltzmann solver for an array of a and k values.
a – scale factor [1] (default:a=1)
k – wavenumber used to compute the power spectrum (default:k=1 \(Mpc^{-1}\)) [\(Mpc^{-1}\)]
diag_only – if set to True: compute powerspectrum for pairs \(a_i, k_i\), else consider all combinations \(a_i, k_j\)
P_cb(a,k): power spectrum of CDM+baryons [\(Mpc^3\)]
Bases: object
Bases: ScipySolver