zeus21.inputs
Takes inputs and stores them in useful classes.
- 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
User parameters for Zeus21. |
|
Cosmological parameters for zeus21. |
|
Astrophysical parameters for zeus21. |
|
Luminosity functions parameters for zeus21. |
Functions
|
Helper function to check whether the input parameters are set with the proper values. |
Module Contents
- class zeus21.inputs.User_Parameters[source]
User parameters for Zeus21.
Calling the class without specifying any parameter will set them to their default values, but they can also be directly set when creating the class:
>>> zeus21.User_Parameters(precisionboost=0.5)
Parameters can also be changed afterwards:
>>> UserParams = zeus21.User_Parameters()
>>> UserParams.precisionboost = 0.5
- Parameters:
precisionboost (float) – Make integrals take more points for boost in precision. Default is 1.0.
dlogzint_target – Target number of redshift bins for the redsfhit arrays in log space. Default is 0.02.
FLAG_FORCE_LINEAR_CF (bool) – False to do standard calculation, True to force linearization of correlation function. Default is False.
MIN_R_NONLINEAR (float) – Minimum radius R/cMpc in which we start doing the nonlinear calculation. Default is 2.0. Below ~1 it will blow up because sigma > 1 eventually, and our exp(delta) approximation breaks. Check if you play with it and if you change Window().
MAX_R_NONLINEAR (float) – Maximum radius R/cMpc in which we start doing the nonlinear calculation (above this it is very linear). Default is 100.0.
FLAG_DO_DENS_NL (bool) – Whether to do the nonlinear (ie lognormal) calculation for the density field itself and its cross correlations. Default is False. Small (<3%) correction in dd, but non trivial (~10%) in d-xa and d-Tx
FLAG_WF_ITERATIVE (bool) – Whether to iteratively do the WF correction as in Hirata2006. Default is True.
zmin (float) – Minimum redshift to which we compute the T21 signals. Default is 5.0.
DO_ONLY_GLOBAL (bool) – Whether zeus21 only runs the global T21 signal (and not fluctuations). Default is False.
USE_BARYON_FLAG (bool) – Whether zeus21 computes 21-cm power spectra with (1+delta_b) prefactor instead of (1+delta) This means LSS terms use P_baryon(k) and P_baryon_x_cdm(k). Default is True.
- class zeus21.inputs.Cosmo_Parameters[source]
Cosmological parameters for zeus21. This class also runs and saves an instance of CLASS.
- Parameters:
UserParams (User_Parameters) – zeus21 class for the user parameters. Default is the default instance of the User_Parameters class.
omegab (float) – Baryon density * h^2. Default is 0.0223828.
omegac (float) – CDM density * h^2. Default is 0.1201075.
h_fid (float) – Hubble constant / 100. Default is 0.67810.
As (float) – Amplitude of initial fluctuations. Default is 2.100549e-09.
ns (float) – Spectral index. Default is 0.9660499.
tau_fid (float) – Optical depth to reionization. Default is 0.05430842.
kmax_CLASS (float) – Maximum wavenumber to be passed to CLASS. Default is 500.0.
zmax_CLASS (float) – Maximum redshift to be passed to CLASS. Default is 50.0.
zmin_CLASS (float) – Minimum redshift to be passed to CLASS. Default is 5.0.
Rs_min (float) – Minimum radius to be passed to CLASS. Default is 0.05. Set to 0.929 when Flag_emulate_21cmfast is True.
Rs_max (float) – Maximum radius to be passed to CLASS. Default is 2000.0. Set to 500 when Flag_emulate_21cmfast is True.
Flag_emulate_21cmfast (bool) – Whether zeus21 emulates 21cmFAST cosmology (used in HMF, LyA, and X-ray opacity calculations). Default is False. When False, sets the Star Formation Rate model to GALLUMI-like, and when True to 21cmfast-like (ignores Mc and beta and has a t* later in SFR()).
USE_RELATIVE_VELOCITIES (bool) – Whether to use v_cb. Default is False.
HMF_CHOICE (str) – Which HMF to use. Default is “ST”. “ST” for the classic Sheth-Tormen (f(nu)), “Yung” for the Tinker08 (f(sigma)) calibrated to Yung+23.
_Mhmin (float) – Minimum halo mass in Msun to compute the HMF. Default is 1e5.
_Mhmax (float) – Maximum halo mass in Msun to compute the HMF. Default is 1e14.
- ClassCosmo[source]
CLASS instance to compute cosmology. It is set with the 6 LCDM parameters set in Cosmo_Parameters.
- Type:
Class
- sigma_vcb[source]
Square root of the variance of the relative velocity field. Default is 1.
- Type:
float
- f_H[source]
Hydrogen number density ratio relative to baryons. Default is 0.924856789420276.
- Type:
float
- f_He[source]
Helium number density ratio relative to baryons. Default is 0.07514321057972385.
- Type:
float
- mu_baryon_Msun[source]
Mean baryonic weight relative to the solar mass. Default is 1.0305080308672013e-57.
- Type:
float
- constRM[source]
Radius-to-mass conversions for HMF. Used for CLASS input so assumes tophat. Default is 165290580780.5916.
- Type:
float
- zfofRint[source]
Interpolation for the redshift as a function of the comoving distance.
- Type:
interp1d
- chiofzint[source]
Interpolation for the comoving distance as a function of the redshift.
- Type:
interp1d
- xetanhint[source]
Interpolation for the electron fraction as a function of redshift.
- Type:
interp1d
- indexminNL[source]
Index of the minimum radius R/cMpc in which we start doing the nonlinear calculation.
- Type:
np.ndarray
- indexmaxNL[source]
Index of the maximum radius R/cMpc in which we start doing the nonlinear calculation.
- Type:
np.ndarray
- a_ST[source]
Rescaling of the HMF barrier. Default is 0.707. Set to 0.73 when Flag_emulate_21cmfast is True.
- Type:
float
- p_ST[source]
Correction factor for the abundance of small mass objects. Default is 0.3. Set to 0.175 when Flag_emulate_21cmfast is True.
- Type:
float
- Amp_ST[source]
Normalization factor for the halo mass function. Default is 0.3222. Set to 0.353 when Flag_emulate_21cmfast is True.
- Type:
float
- delta_crit_ST[source]
Barrier for halo to collapse in Sheth-Tormen formalism. Default is 1.686. Set to 1.68 when Flag_emulate_21cmfast is True.
- Type:
float
- a_corr_EPS[source]
Correction to the EPS relation between nu and nu’ when doing extended PS. Follows hi-z simulation results from Schneider+21. Default is 0.707. Set to 1.0 when Flag_emulate_21cmfast is True.
- Type:
float
- UserParams: dataclasses.InitVar[User_Parameters][source]
- class zeus21.inputs.Astro_Parameters[source]
Astrophysical parameters for zeus21.
- Parameters:
CosmoParams (Cosmo_Parameters) – zeus21 class for the cosmological parameters. Needs to be inputed.
accretion_model (str) – Accretion model. “exp” for exponential, “EPS” for EPS. “RP16” for the dynamically averaged fitting function in Rodríguez-Puebla+16. Default is “exp”.
USE_POPIII (bool) – Whether to use Pop III. Default is False.
USE_LW_FEEDBACK (bool) – Whether to use the Lyman-Werner feedback. Default is True.
quadratic_SFRD_lognormal (bool) – Whether to use the second order correction to the SFRD approximation. Default is True.
epsstar (float) – Amplitude of the star formation efficiency (at M_pivot). Default is 0.1.
dlog10epsstardz (float) – Derivative of epsstar with respect to z. Default is 0.0.
alphastar (float) – Power law index of the star formation efficiency at low masses. Default 0.5.
betastar (float) – Power law index of the star formation efficiency at high masses. Not used if Flag_emulate_21cmfast = True. Default -0.5.
Mc (float) – Mass at which the star formation efficiency cuts. Not used if Flag_emulate_21cmfast=True. Default 3e11.
epsstar_III (float) – Amplitude of the star formation efficiency (at M_pivot) for Pop III. Default is 10**(-2.5).
dlog10epsstardz_III (float) – Derivative of epsstar with respect to z for Pop III. Default is 0.0.
alphastar_III (float) – Power law index of the Pop III star formation efficiency at low masses. Default 0.0.
betastar_III (float) – Power law index of the Pop III star formation efficiency at high masses. Default 0.0.
Mc_III (float) – Mass at which the Pop III star formation efficiency cuts. Default 1e7.
Mup_III (str, float, None) – High-mass cutoff for Pop III star formation efficiency. Default “Matom” for Pop III star formation confined to molecular-cooling minihalos; also accepts custom cutoff value or None for no cutoff
DETACH_III_ACH (bool) – Whether to have a separate set of parameters for star formation efficiency for the (ACH) component for Pop III. Default is False.
epsstar_III_ACH (float) – Amplitude of the star formation efficiency (at M_pivot) for the (ACH) component for Pop III. Default is 0.0.
dlog10epsstardz_III_ACH (float) – Derivative of epsstar with respect to z for the (ACH) component for Pop III. Default is 0.0.
alphastar_III_ACH (float) – Power law index of the (ACH) component of Pop III star formation efficiency at low masses. Default 0.0.
betastar_III_ACH (float) – Power law index of the (ACH) component of Pop III star formation efficiency at high masses. Default 0.0.
Mc_III_ACH (float) – Mass at which the (ACH) component of Pop III star formation efficiency cuts. Default 1e7.
N_alpha_perbaryon_II (float) – Number of photons between LyA and Ly Continuum per baryon (from LB05). Default is 9690.
N_alpha_perbaryon_III (float) – Number of photons between LyA and Ly Continuum per baryon (from LB05) for Pop III. Default is 17900.
L40_xray (float) – Soft-band (E<2 keV) lum/SFR in Xrays in units of 10^40 erg/s/(Msun/yr). Default is 3.0.
E0_xray (float) – Minimum energy in eV. Default is 500.
alpha_xray (float) – Xray SED power-law index. Default is -1.0.
L40_xray_III (float) – Soft-band (E<2 keV) lum/SFR in Xrays in units of 10^40 erg/s/(Msun/yr) for Pop III. Default is 3.0.
alpha_xray_III (float) – Xray SED power-law index. Default is -1.0.
Emax_xray_norm (float) – Max energy in eV to normalize SED. Default at 2000.0 eV.
fesc10 (float) – Amplitude of the escape fraction. Default is 0.1. Escape fraction assumed to be a power law normalized (fesc10) at M=1e10 Msun with index alphaesc.
alphaesc (float) – Index for the escape fraction. Default is 0.0. Escape fraction assumed to be a power law normalized (fesc10) at M=1e10 Msun with index alphaesc.
fesc7_III (float) – Amplitude of the Pop III escape fraction. Default is 10**(-1.35). Escape fraction assumed to be a power law normalized (fesc10) at M=1e10 Msun with index alphaesc.
alphaesc_III (float) – Index for the Pop III escape fraction. Default is -0.3. Escape fraction assumed to be a power law normalized (fesc10) at M=1e10 Msun with index alphaesc.
clumping (float) – Clumping factor, which is z-independent and fixed for now. Default is 3.0, changed to 2.0 when Flag_emulate_21cmfast=True.
R_linear_sigma_fit_input (float) – Initial guess radius at which the linear fit of the barrier is computed. Default is 10.0.
FLAG_BMF_converge (bool) – Whether zeus21 allow the BMF to try and make the average ionized fraction converge. Default is True.
max_iter (int) – Maximum iteration allowed for the convergence of the BMF. Default is 10.
ZMAX_REION (float) – Maximum redshift to which the reionization quantities are computed. Default is 30.0.
Rbub_min (float) – Minimum bubble radius. Default is 0.05.
A_LW (float) – Parameters controlling the LW feedback factor (see Munoz+22, eq 13). Default is 2.0.
beta_LW (float) – Parameters controlling the LW feedback factor (see Munoz+22, eq 13). Default is 0.6.
A_vcb (float) – Normalization for the relative velocity feedback parameter. Default is 1.0.
beta_vcb (float) – Spectral index for the relative velocity feedback parameter. Default 1.8.
Mturn_fixed (float | None) – Turn-over halo mass at which the star formation rate cuts. Default is None.
FLAG_MTURN_SHARP (bool) – Whether to do sharp cut at Mturn_fixed or regular exponential cutoff. Only active if FLAG_MTURN_FIXED and turned on by hand. Default is False.
FLAG_USE_PSD (bool) – Whether to derive MUV and sigmaUV from integrating SFH. Default is False.
FLAG_COMPARE_BAGPIPES (bool) – Whethher to compare with bagpipes. Default is False.
SEDMODEL (str = "BPASS") – Which SED model to use for the Greens functions. Default is “BPASS”. Can be set to “bagpipes”, “BPASS_binaries”, and “BPASS”.
normLHa_ZIMF (float) – Floating normalization of the LHa luminosity compared to the baseline SEDMODEL to account for HMF or metallicity changes. Default is 1.0
alphanormLHa_ZIMF – Power-law index of normLHa_ZIMF against halo mass. Default is 0.0
sigmaPSD (float) – Amplitude of fluctuations in SFR arising from the power spectral density (PSD) model of SFR variability. Default is 0.5. This is the baseline scatter in ln(SFR) at a reference halo mass of 10^10 Msun.
dsigmaPSDdlog10Mh (float) – Slope of the scatter with respect to halo mass. Default is 0.0.
tauPSD (float) – Characteristic timescale (in Myr) that enters the power spectral density (PSD) of ln(SFR). Default is 10.0.
dlog10tauPSDdlog10Mh (float) – Slope of the timescale with respect to halo mass. Default is 0.0.
_tcut_LUV_short (float) – Sets where the LUV short and long are separated in Myr. Default is 30.0.
FLAG_RENORMALIZE_AVG_SFH (bool) – Whether to normalize the SFR in Msun/yr at each Mh. Default is True.
- Emax_xray_integral[source]
Max energy in eV that zeus21 integrate up to. Higher than Emax_xray_norm since photons can redshift from higher z. Set by zeus21 to 10000.
- Type:
float
- N_ion_perbaryon_II[source]
Number of ionizing photons per baryon. Fixed for PopII-type (Salpeter) by zeus21 to 5000.
- Type:
int
- N_ion_perbaryon_III[source]
Number of ionizing photons per baryon for Pop III. Fixed for PopIII-type to 44000 (or 52480 when Flag_emulate_21cmfast=True), from Klessen & Glover 2023 Table A2 (2303.12500).
- Type:
int
- N_LW_II[source]
Number of LW photons per baryon. Assuming BL05 stellar spectrum, equal to N_alpha_perbaryon_II * fraction of photons that fall in the LW band.
- Type:
float
- N_LW_III[source]
Number of LW photons per baryon. Assuming Intermediate IMF from 2202.02099, equal to 4.86e-22 / (11.9 * u.eV).to(u.erg).value * 5.8e14.
- Type:
float
- FLAG_MTURN_FIXED[source]
Whether to fix Mturn or use Matom(z) at each z. Set by zeus21 depending on Mturn_fixed.
- Type:
bool
- CosmoParams: dataclasses.InitVar[Cosmo_Parameters][source]
- class zeus21.inputs.LF_Parameters[source]
Luminosity functions parameters for zeus21.
- Parameters:
zcenter (float) – Redshift bin center at which to compute the luminosity functions. Default is 6.0.
zwidth (float) – Redshift bin width at which to compute the luminosity functions. Default is 0.5
RETURNLF (bool) – Whether to compute LFs. Default is True.
RETURNBIAS (bool) – Whether to compute bias. Default is False.
SKIP_POPII (bool) – If True, skip the Pop II component. Default is False.
SKIP_POPIII (bool) – If True, skip the Pop III component. Default is True.
SKIP_TOT (bool) – If True, skip the summed component. Default is False.
FLAG_COMPUTE_UVLF (bool) – Whether to compute the UV LF/bias. Default is True.
MUVcenters (np.ndarray | float) – M_UV bin centers at which to compute the luminosity functions. Default is np.linspace(-23,-14,100).
MUVwidths (np.ndarray | float) – M_UV bin width at which to compute the luminosity functions. Default is 0.5.
FLAG_RENORMALIZE_LUV – Whether to renormalize the lognormal LUV with sigmaUV to recover <LUV> or otherwise <MUV>. Default is False (recommended).
_kappaUV (float = 1.15e-28.) – SFR-to-UV conversion factor in Msun/yr per erg/s/Hz.
sigmaUV (float) – Stochasticity (gaussian rms) in the halo-galaxy connection P(MUV | Mh). Default is 0.5.
UV_boost_III (float) – Pop III main-component UV conversion factor relative to Pop II. Default is 1.
_kappaUV_III (float = kappaUV/UV_boost_III.) – SFR-to-UV conversion factor in Msun/yr per erg/s/Hz for Pop III main component.
sigmaUV_III (float) – MUV scatter for the Pop III main component. Default is 0.5.
DUST_FLAG_III (bool) – Whether to include dust attenuation to the LF calculations for Pop III main component. Default is False.
UV_boost_III_ACH (float) – Pop III detached atomic-cooling-halo UV conversion factor relative to Pop II. Default is 1.
_kappaUV_III_ACH (float = kappaUV/UV_boost_III_ACH.) – SFR-to-UV conversion factor in Msun/yr per erg/s/Hz for Pop III ACH component.
sigmaUV_III_ACH (float) – MUV scatter for the detached Pop III ACH component. Default is 0.5.
DUST_FLAG_III_ACH (bool) – Whether to include dust attenuation to the LF calculations for Pop III ACH component. Default is False.
FLAG_COMPUTE_HaLF (bool) – Whether to compute the Ha LF/bias. Default is False.
log10LHacenters (np.ndarray | float) – Ha bin centers at which to compute the luminosity functions, given in log10. Default is np.linspace(38,45,10).
log10LHawidths (np.ndarray | float) – Ha bin width at which to compute the luminosity functions, given in log10. Default is 0.5.
DUST_FLAG (bool) – Whether to include dust attenuation to the LF calculations. Default is True.
DUST_model (str) – Which dust model to use. Default is “Bouwens13”. Can also be “Zhao24” (https://arxiv.org/pdf/2401.07893.pdf, table 1).
HIGH_Z_DUST (bool) – Whether to do dust at higher z than 0 or set to 0. Fix at beta(z=_zmaxdata) result if so. Default is True.
_zmaxdata (float) – Maximum calibration redshift for the dust model. Default is 8.0.
C0dust (float) – Calibration parameter for the dust correction for UVLF. Default is 4.43 (following Meurer+99). Input 4.54 for Overzier+01.
C1dust (float) – Calibration parameter for the dust correction for UVLF. Default 1.99 for Meurer99. Input 2.07 for Overzier+01.
sigma_times_AUV_dust (float) – If not 0, normalization factor to the sigma UV of dust. Default is 0.0.