zeus21.T21coefficients
- Bulk of the Zeus21 calculation:
Determines Lyman-alpha and X-ray fluxes,
Evolves the cosmic-dawn IGM state (WF coupling and heating),
Computes the 21-cm global signal and the effective biases gammaR to determine the 21-cm power spectrum.
- Authors: zeus21 v2 collaboration - June 2026
Emily Bregou ; Hector Afonso G. Cruz ; Sarah Libanore ; Julian B. Muñoz ; Yonny Sklansky ; Emilie Thélie ; Alessandra Venditti
arXiv:2302.08506, arXiv:2306.09403, arXiv:2407.18294, Sklansky et al. (in prep)
Classes
Determines Lyman-alpha properties and fluxes. |
|
Determines X-ray properties and fluxes. |
|
Loops through SFRD integrals and accounts for LyA coupling and Xray heating to obtain the average T21 and the coefficients for its power spectrum |
Module Contents
- class zeus21.T21coefficients.LyAlpha_class(UserParams, CosmoParams, AstroParams, HMFinterp, z_Init=None, SFRD_Init=None)[source]
Determines Lyman-alpha properties and fluxes.
- Parameters:
UserParams (UserParams class)
CosmoParams (CosmoParams class)
AstroParams (AstroParams class)
HMFinterp (HMFinterp class)
z_Init (Z_init class, optional) – Initial redshift matrices for the calculation (see sfrd.py for details). Default is None.
SFRD_Init (SFRD_class class, optional) – Initial star formation rate density for the calculation (see sfrd.py for details). Default is None.
- coeff1LyAzp[source]
Redshift-dependent coefficient in the J_alpha flux computation, see Eq. 29 in arXiv:2302.08506.
- Type:
array
- coeff2LyAzpRR_II[source]
Coefficient that multiplies the SFRD in the integral for J_alpha for Pop II stars, see Eq. 30 of arXiv:2302.08506.
- Type:
array
- coeff2LyAzpRR_III
Coefficient that multiplies the SFRD in the integral for J_alpha for Pop III stars.
- Type:
array
- class zeus21.T21coefficients.Xrays_class(UserParams, CosmoParams, AstroParams, HMFinterp, z_Init=None, SFRD_Init=None)[source]
Determines X-ray properties and fluxes.
- Parameters:
UserParams (UserParams class)
CosmoParams (CosmoParams class)
AstroParams (AstroParams class)
HMFinterp (HMFinterp class)
z_Init (Z_init class, optional) – Initial redshift matrices for the calculation (see sfrd.py for details). Default is None.
SFRD_Init (SFRD_class class, optional) – Initial star formation rate density for the calculation (see sfrd.py for details). Default is None.
- atomfractions[source]
Fraction of baryons in HI and HeI, assumed to just be the avg cosmic. Used to compute X-ray absorption.
- Type:
array
- coeff1Xzp[source]
Redshift-dependent coefficient in the X-ray flux computation, with extra factors to account for adiabatic cooling and the fact that we compute the integral in redshift instead of time.
- Type:
array
- coeff2XzpRR_II[source]
Coefficient that multiplies the SFRD in the integral for the X-ray flux for Pop II stars
- Type:
array
- coeff2XzpRR_III
Coefficient that multiplies the SFRD in the integral for the X-ray flux for Pop III stars
- Type:
array
- _GammaXray_II[source]
X-ray ionization rate for Pop II stars, in s^-1, see Eq. 37 in arXiv:2302.08506
- Type:
array
- coeff_Gammah_Tx_II[source]
Coefficient that multiplies the X-ray ionization rate to get the X-ray heating rate for Pop II stars, in K/s, see Eq. 41 in arXiv:2302.08506.
- Type:
array
- coeff_Gammah_Tx_III[source]
Coefficient that multiplies the X-ray ionization rate to get the X-ray heating rate for Pop III stars, in K/s
- Type:
array
- _xe_avg_ad
Average ionization fraction of the IGM from adiabatic cooling and recombinations
- Type:
array
- _xe_avg
Average ionization fraction of the IGM, including both the contribution from UV photons and the partial ionization from X-rays
- Type:
array
- _fheat[source]
Fraction of X-ray energy that goes into heating, as opposed to ionization
- Type:
array
- Tk_avg[source]
Average kinetic temperature of the IGM, including both adiabatic cooling and X-ray heating, in K
- Type:
array
- sigma_HI[source]
Cross section for X-ray absorption by HI, as a function of energy in eV, in cm^2
- Type:
function
- sigma_HeI[source]
Cross section for X-ray absorption by HeI, as a function of energy in eV, in cm^2
- Type:
function
- class zeus21.T21coefficients.get_T21_coefficients(UserParams, CosmoParams, AstroParams, HMFinterp, z_Init=None, SFRD_Init=None)[source]
Loops through SFRD integrals and accounts for LyA coupling and Xray heating to obtain the average T21 and the coefficients for its power spectrum
- Parameters:
UserParams (object) – User-defined parameters
CosmoParams (object) – Cosmological parameters
AstroParams (object) – Astrophysical parameters
HMFinterp (object) – Halo mass function interpolator
- z_Init
Redshift tables for the calculation (see sfrd.py for details)
- Type:
object
- SFRD_Init
Initial star formation rate density for the calculation (see sfrd.py for details)
- Type:
object
- USE_POPIII[source]
Whether to include Pop III stars in the calculation or not, determined by AstroParams
- Type:
bool
- relvel
Relative velocity between baryons and dark matter, which affects the SFRD and therefore the LyA and X-ray fluxes. Only computed if USE_POPIII is True
- Type:
object or None
- LyA[source]
Lyman-alpha anisotropies, which depend on the SFRD and the redshift tables; see LyAlpha_class for details
- Type:
object
- Xrays[source]
X-ray anisotropies, which depend on the SFRD and the redshift tables; see Xrays_class for details
- Type:
object
- ReioGlobal[source]
Global reionization history, which depends on the SFRD and the redshift tables; see reionization.py for details
- Type:
object
- xHI_avg[source]
Average neutral hydrogen fraction volume-weighted, computed from the global reionization history
- Type:
array
- tau_reio_val[source]
Optical depth to reionization, computed from the global reionization history and the average neutral hydrogen fraction
- Type:
float
- __ getattr__
This method allows us to access the attributes of the classes that we initialized directly from the get_T21_coefficients class, without having to specify which class they come from
- Type:
method
- evolve_T21_fields[source]
Compute evolution of the LyA flux, LyA coupling coefficient, color temperature and spin temperature
- Type:
method
- Jalpha_avg
Average LyA flux at all redshifts and radii
- Type:
array
- _coeff_Ja_xa_0
Normalization of the LyA flux at all redshifts
- Type:
array
- coeff_Ja_xa
LyA flux corrected with Hirata2006 prescription
- Type:
array
- xa_avg
LyA coupling coefficient
- Type:
array
- TCMB
CMB temperature at all redshifts
- Type:
array
- invTcol_avg
Inverse of the color temperature (equal 1/Tk)
- Type:
array
- _invTs_avg
Inverse of the spin temperature
- Type:
array
- evolve_T21_fields(UserParams, CosmoParams)[source]
Compute evolution of the LyA flux, LyA coupling coefficient, color temperature and spin temperature
- Parameters:
UserParams (object) – User-defined parameters
CosmoParams (object) – Cosmological parameters
- Return type:
None
- tau_reio(CosmoParams, zlist, xHI)[source]
Compute the optical depth to reionization
- Parameters:
CosmoParams (object) – Cosmological parameters
zlist (list) – Redshifts
xHI (array) – Neutral fraction as function of redshift
- Returns:
tau_reio
- Return type:
list
- Salpha_exp(z, T, xe)[source]
Hirata2006 correction to the LyA flux (Eq 55 in astro-ph/0608032). This function is used to initialize the xalpha computation, but then overwritten. Only used if FLAG_WF_ITERATIVE == False
- Parameters:
z (float) – Redshifts
T (float) – Temperature in K
xe (float) – Free electron fraction with small reionization (xe << 1)
- Returns:
Salpha – Correction to the LyA flux
- Return type:
float