HyRex.recomb_functions module

HyRex.recomb_functions.Gamma_compton(xe, TCMB, YHe)[source]

Computes the Compton scattering rate. See Eq.(2) of 1904.09296

Dimensions: s^{-1}

Parameters:

  • xe float

    Free electron fraction.

  • TCMB float

    CMB temperature, in eV.

  • YHe float

    Helium mass fraction.

Returns:

  • GammaC float

    The Compton scattering rate

HyRex.recomb_functions.alpha_H(Tm)[source]

Case-B recombination coefficient for hydrogen.

Dimensions: cm^3 s^{-1}

WARNING: Assumes input Tm to be in eV.

Parameters:

  • Tm float

    Matter temperature.

Returns:

  • alpha_H float

    Case B recombination coefficient for hydrogen at given matter temperature.

HyRex.recomb_functions.beta_H(TCMB)[source]

Case-B photoionization coefficient for hydrogen.

Dimensions: s^{-1}

WARNING: Assumes input TCMB to be in eV.

Parameters:

  • TCMB float

    CMB temperature.

Returns:

  • beta_H float

    Case B photoionization coefficient for hydrogen at given CMB (radiation) temperature.

HyRex.recomb_functions.effective_coefficients(TCMB, Tm, H, nH, x1s)[source]

Computes the effective coefficients for, Case-B recombination (A2s, A2p), Case-B photoionization (B2s, B2p), and Generalized Peebles factors (C2s, C2p) in the effetive four-level-atom strategy outlined by arXiv:1011.3758.

Dimensions: A2s, A2p : cm^3 s^{-1} B2s, B2p : s^{-1} C2s, C2p : None

Parameters:

  • TCMB float

    Current CMB temperature, in eV.

  • Tm float

    Current matter temperature, in eV.

  • H float

    Current Hubble parameter, in s^{-1}.

  • nH float

    Current proton (free+bound) number density, in cm^{-3}.

  • x1s float

    Fraction of proton in the 1s bound state.

Returns:

  • coefficients tuple (float, float, float, float, float, float, float, float)

    A tuple of the six relevant effective coefficients for the four-level-atom.

HyRex.recomb_functions.peebles_C(z, xHII, H, nH)[source]

Peebles C factor, probability for an n=2 hydrogen atom to reach the ground state before becoming photoionized, a function of redshift and ionized proton fraction.

Dimensions: None

Parameters:

  • z float/jnp.array

    Requested redshift(s).

  • xHII float

    Ionized hydrogen fraction.

  • H float/jnp.array

    Value(s) of Hubble at given redshift(s).

  • nH float/jnp.array

    Value(s) of hydrogen number density at given redshift(s)

Returns:

  • C float/jnp.array

    Peebles C factor.

HyRex.recomb_functions.xe_Saha(TCMB, nH)[source]

Computes the free electron fraction in the Saha equilibrium approximation, valid at early times when matter and photons are in Chemical Equilibrium.

Parameters:

  • TCMB float

    CMB temperature, in eV

  • nH float

    Current Hydrogen number density, in cm^{-3}

Returns:

  • xe_saha float

    Saha equilibrium prediction of free electron fraction.

  • s float

    xe_saha^2/(1-xe_saha)