camb.initialpower

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.

has_tensors()[source]

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, r=0, nt=None, ntrun=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.

Parameters:
  • As – comoving curvature power at k=piveo_scalar
  • ns – scalar spectral index
  • nrun – running of scalar spectral index d n_s/d log k
  • nrunrun – running of running of spectral index
  • r – tensor to scalar ratio at pivot
  • nt – tensor spectral index. 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
Returns:

self