Recombination models

class camb.recombination.RecombinationModel(*args, **kwargs)[source]

Abstract base class for recombination models

Variables:

min_a_evolve_Tm – (float64) minimum scale factor at which to solve matter temperature perturbation if evolving sound speed or ionization fraction perturbations

class camb.recombination.Recfast(*args, **kwargs)[source]

Bases: RecombinationModel

RECFAST recombination model (see recfast source for details).

Variables:
  • RECFAST_fudge – (float64)

  • RECFAST_fudge_He – (float64)

  • RECFAST_Hswitch – (boolean)

  • RECFAST_He_rate_correction – (boolean)

  • AGauss1 – (float64)

  • AGauss2 – (float64)

  • zGauss1 – (float64)

  • zGauss2 – (float64)

  • wGauss1 – (float64)

  • wGauss2 – (float64)

  • Nz – (integer)

  • use_rosenbrock – (boolean)

  • rosenbrock_handoff_xH – (float64)

  • rosenbrock_tol – (float64)

set_params(recfast_approx_model=None)[source]

Set RECFAST approximation parameters.

Parameters:

recfast_approx_model

optional named approximation parameter set. One of

  • planck: CAMB v1.x/RECFAST 1.5.2 Planck-era fudge parameters.

  • cosmorec: RECFAST fit with an He rate correction to direct CosmoRec accuracy=6 with 10 H shells.

  • hyrec: seven-parameter RECFAST fit to direct HyRec-2.

Returns:

self

class camb.recombination.CosmoRec(*args, **kwargs)[source]

Bases: RecombinationModel

CosmoRec recombination model. To use this, CAMB must be built with CosmoRec installed from GitHub and RECOMBINATION_FILES set to include cosmorec in the CAMB Makefile.

Variables:
  • runmode – (integer) Default 0, with diffusion; 1: without diffusion; 2: RECFAST++, 3: RECFAST++ run with correction

  • fdm – (float64) Dark matter annihilation efficiency

  • accuracy – (float64) CosmoRec accuracy preset; see CosmoRec source for supported values

  • diff_iteration_max – (integer) Override CosmoRec diffusion iteration count; negative uses batch default (2)

  • n_shells – (integer) Override CosmoRec hydrogen shells; negative uses selected accuracy preset

  • n_shells_hei – (integer) Override CosmoRec helium shells; negative uses selected accuracy preset

  • flag_hi_absorption – (integer) Override CosmoRec HI absorption flag; negative uses selected accuracy preset

  • n_s_2gamma – (integer) Override CosmoRec two-photon shell limit; negative uses selected accuracy preset

  • n_s_raman – (integer) Override CosmoRec Raman shell limit; negative uses selected accuracy preset

class camb.recombination.HyRec(*args, **kwargs)[source]

Bases: RecombinationModel

HyRec recombination model. To use this, the library must be built with HyRec installed and RECOMBINATION_FILES including hyrec in the Makefile.