Dark Energy models

class camb.dark_energy.DarkEnergyModel[source]

Abstract base class for dark energy model implementations.

class camb.dark_energy.DarkEnergyEqnOfState[source]

Bases: camb.dark_energy.DarkEnergyModel

Abstract base class for models using w and wa parameterization with use w(a) = w + (1-a)*wa parameterization, or call set_w_a_table to set another tabulated w(a). If tabulated w(a) is used, w and wa are set to approximate values at z=0.

See model.CAMBparams.set_initial_power_function() for a convenience constructor function to set a general interpolated P(k) model from a python function.

  • w – (float64) w(0)
  • wa – (float64) -dw/da(0)
  • cs2 – (float64) fluid rest-frame sound speed squared
  • use_tabulated_w – (boolean) using an interpolated tabulated w(a) rather than w, wa above
set_params(w=-1.0, wa=0, cs2=1.0)[source]
Set the parameters so that P(a)/rho(a) = w(a) = w + (1-a)*wa
  • w – w(0)
  • wa – -dw/da(0)
  • cs2 – fluid rest-frame sound speed squared
set_w_a_table(a, w)[source]

Set w(a) from numerical values (used as cublic spline). Note this is quite slow.

  • a – array of scale factors
  • w – array of w(a)


class camb.dark_energy.DarkEnergyFluid[source]

Bases: camb.dark_energy.DarkEnergyEqnOfState

Class implementing the w, wa or splined w(a) parameterization using the constant sound-speed single fluid model (as for single-field quintessense).

class camb.dark_energy.DarkEnergyPPF[source]

Bases: camb.dark_energy.DarkEnergyEqnOfState

Class implementating the w, wa or splined w(a) parameterization in the PPF perturbation approximation (arXiv:0808.3125) Use inherited methods to set parameters or interpolation table.

class camb.dark_energy.AxionEffectiveFluid[source]

Bases: camb.dark_energy.DarkEnergyModel

Example implementation of a specifc (early) dark energy fluid model (arXiv:1806.10608). Not well tested, but should serve to demonstrate how to make your own custom classes.

  • w_n – (float64) effective equation of state parameter
  • fde_zc – (float64) energy density fraction at z=zc
  • zc – (float64) decay transition redshift (not same as peak of energy density fraction)
  • theta_i – (float64) initial condition field value