class camb.initialpower.InitialPowerParams[source]

Object to store parameters for the primordial power spectrum. Many of the internal variables are arrays, to allow calculating more than one power spectrum at one. Higher-level functions in the CAMB python wrapper assume only one is calculated.


Do these settings have non-zero tensors?

Returns:True of non-zero tensor amplitude
set_params(As=2e-09, ns=0.96, nrun=0, nrunrun=0.0, r=0.0, nt=None, ntrun=0.0, pivot_scalar=0.05, pivot_tensor=0.05, parameterization=2)[source]

Set parameters using standard power law parameterization. If nt=None, uses inflation consistency relation.

  • As – comoving curvature power at k=pivot_scalar (\(A_s\))
  • ns – scalar spectral index \(n_s\)
  • nrun – running of scalar spectral index \(d n_s/d \log k\)
  • nrunrun – running of running of spectral index, \(d^2 n_s/d (\log k)^2\)
  • r – tensor to scalar ratio at pivot
  • nt – tensor spectral index \(n_t\). If None, set using inflation consistency
  • ntrun – running of tensor spectral index
  • pivot_scalar – pivot scale for scalar spectrum
  • pivot_tensor – pivot scale for tensor spectrum
  • parameterization – See CAMB notes. One of - tensor_param_indeptilt = 1 - tensor_param_rpivot = 2 - tensor_param_AT = 3