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:
xefloatFree electron fraction.
TCMBfloatCMB temperature, in eV.
YHefloatHelium mass fraction.
Returns:
GammaCfloatThe 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:
TmfloatMatter temperature.
Returns:
alpha_HfloatCase 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:
TCMBfloatCMB temperature.
Returns:
beta_HfloatCase 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:
TCMBfloatCurrent CMB temperature, in eV.
TmfloatCurrent matter temperature, in eV.
HfloatCurrent Hubble parameter, in s^{-1}.
nHfloatCurrent proton (free+bound) number density, in cm^{-3}.
x1sfloatFraction of proton in the 1s bound state.
Returns:
coefficientstuple (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:
zfloat/jnp.arrayRequested redshift(s).
xHIIfloatIonized hydrogen fraction.
Hfloat/jnp.arrayValue(s) of Hubble at given redshift(s).
nHfloat/jnp.arrayValue(s) of hydrogen number density at given redshift(s)
Returns:
Cfloat/jnp.arrayPeebles 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:
TCMBfloatCMB temperature, in eV
nHfloatCurrent Hydrogen number density, in cm^{-3}
Returns:
xe_sahafloatSaha equilibrium prediction of free electron fraction.
sfloatxe_saha^2/(1-xe_saha)