BBN models

class camb.bbn.BBNIterpolator(x, y, z, bbox=[None, None, None, None], kx=3, ky=3, s=0)[source]
class camb.bbn.BBNPredictor[source]

The base class for making BBN predictions for Helium abundance

Y_He(ombh2, delta_neff=0.0)[source]

Get BBN helium mass fraction for CMB code.

Parameters:
  • ombh2\(\Omega_b h^2\)

  • delta_neff – additional N_eff relative to standard value (of 3.044)

Returns:

Y_He helium mass fraction predicted by BBN

Y_p(ombh2, delta_neff=0.0)[source]

Get BBN helium nucleon fraction. Must be implemented by extensions.

Parameters:
  • ombh2\(\Omega_b h^2\)

  • delta_neff – additional N_eff relative to standard value (of 3.044)

Returns:

Y_p helium nucleon fraction predicted by BBN

class camb.bbn.BBN_fitting_parthenope(tau_neutron=None)[source]

Old BBN predictions for Helium abundance using fitting formulae based on Parthenope (pre 2015).

Y_p(ombh2, delta_neff=0.0, tau_neutron=None)[source]

Get BBN helium nucleon fraction. # Parthenope fits, as in Planck 2015 papers

Parameters:
  • ombh2\(\Omega_b h^2\)

  • delta_neff – additional N_eff relative to standard value (of 3.046 for consistency with Planck)

  • tau_neutron – neutron lifetime

Returns:

\(Y_p^{\rm BBN}\) helium nucleon fraction predicted by BBN

class camb.bbn.BBN_table_interpolator(interpolation_table='PRIMAT_Yp_DH_ErrorMC_2021.dat', function_of=('ombh2', 'DeltaN'))[source]

BBN predictor based on interpolation from a numerical table calculated by a BBN code.

Tables are supplied for Parthenope 2017 (PArthENoPE_880.2_standard.dat), similar but with Marucci rates (PArthENoPE_880.2_marcucci.dat), PRIMAT (PRIMAT_Yp_DH_Error.dat, PRIMAT_Yp_DH_ErrorMC_2021.dat).

Parameters:
  • interpolation_table – filename of interpolation table to use.

  • function_of – two variables that determine the interpolation grid (x,y) in the table, matching top column label comment. By default ombh2, DeltaN, and function argument names reflect that, but can also be used more generally.

DH(ombh2, delta_neff=0.0, grid=False)[source]

Get deuterium ratio D/H by interpolation in table

Parameters:
  • ombh2\(\Omega_b h^2\) (or, more generally, value of function_of[0])

  • delta_neff – additional N_eff relative to standard value (of 3.044) (or value of function_of[1])

  • grid – parameter for RectBivariateSpline (whether to evaluate the results on a grid spanned by the input arrays, or at points specified by the input arrays)

Returns:

D/H

Y_p(ombh2, delta_neff=0.0, grid=False)[source]

Get BBN helium nucleon fraction by intepolation in table.

Parameters:
  • ombh2\(\Omega_b h^2\) (or, more generally, value of function_of[0])

  • delta_neff – additional N_eff relative to standard value (of 3.044) (or value of function_of[1])

  • grid – parameter for RectBivariateSpline (whether to evaluate the results on a grid spanned by the input arrays, or at points specified by the input arrays)

Returns:

Y_p helium nucleon fraction predicted by BBN. Call Y_He() to get mass fraction instead.

get(name, ombh2, delta_neff=0.0, grid=False)[source]

Get value for variable “name” by intepolation from table (where name is given in the column header comment) For example get(‘sig(D/H)’,0.0222,0) to get the error on D/H

Parameters:
  • name – string name of the parameter, as given in header of interpolation table

  • ombh2\(\Omega_b h^2\) (or, more generally, value of function_of[0])

  • delta_neff – additional N_eff relative to standard value (of 3.044) (or value of function_of[1])

  • grid – parameter for RectBivariateSpline (whether to evaluate the results on a grid spanned by the input arrays, or at points specified by the input arrays)

Returns:

Interpolated value (or grid)

camb.bbn.get_predictor(predictor_name=None)[source]

Get instance of default BBNPredictor class. Currently numerical table interpolation as Planck 2018 analysis.