"""
Keep here all global flags, numerical constants, and conversion factors/units.
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)
"""
###############################
### Units and constants ###
###############################
[docs]
MpcToKm = (3.086e+13 * 1e6)
[docs]
MsunToMpc = MsunToKm * KmToMpc
[docs]
GramtoGeV = 1 / 5.6095886e23
[docs]
MsuntoGeV = Msuntogram/GramtoGeV
[docs]
mprotoninMsun = mH_GeV/MsuntoGeV
[docs]
c_Mpcs = c_kms / MpcToKm
[docs]
Mpctoyr = MpcToKm/c_kms/yrTos
#LW related constants
#X-ray related constants
[docs]
normLX_CONST = 1e40 #normalization of Xray luminosity, in units of erg/s/SFR = erg/s/(Msun/yr)
[docs]
sigma0norm = 1e-18 #cm^2 normalization of xray cross sections
[docs]
ZMAX_INTEGRAL = 35.0 #at which z we start the integrals. We take 35. as fiducial since there is not much SFRD. Make sure to test if you have exotic cosmology/astrophysics
#LyA related constants
[docs]
wavelengthLyC = 91.1753 ##lyman continuum in nm
[docs]
wavelengthLyA = wavelengthLyC/(1.-1./4.) #lyman alpha, in nm
[docs]
wavelengthLyB = wavelengthLyC/(1.-1./9.) #lyman beta, in nm
[docs]
freqLyA = c_kms/wavelengthLyA * 1e12 #lyman alpha, in Hz
[docs]
freqLyB = c_kms/wavelengthLyB * 1e12 #lyman beta, in Hz
[docs]
freqLyCont = c_kms/wavelengthLyC * 1e12 #lyman continuum in Hz
[docs]
n_max_recycle = 22 #we actually have 25 but they matter less and less
[docs]
fractions_recycle = [1.0, 0.0, 0.2609 ,0.3078 ,0.3259 ,0.3353 ,0.3410 ,0.3448 , 0.3476, 0.3496, 0.3512, 0.3524, 0.3535, 0.3543,0.3550 ,0.3556 ,0.3561 ,0.3565 ,0.3569 ,0.3572 ,0.3575 ,0.3578 ,0.3580 , 0.3582, 0.3584, 0.3586, 0.3587, 0.3589, 0.3590]
#Table 5 in astro-ph/0608032
[docs]
gcolorfactorHirata = 0.405535 #factor to calculate Tcolor from Tk iteratively from Hirata 2005 (astro-ph/0507102 Eq. (42))
[docs]
widthLyA=50*1e6 #Hz, from astro-ph/0507102
[docs]
widthLyAcm = widthLyA/(c_kms*1e5) #cm
[docs]
Tstar_21 = 0.0682 #T* in K for the 21cm transition
[docs]
A10_21 = 2.85e-15 #1/s, Einstein 10 coeff for HI
#whether to renormalize the C2 oefficients (appendix in 2302.08506)
#C2_RENORMALIZATION_FLAG = 1 - FLAG_FORCE_LINEAR_CF
[docs]
RGauss_factor = 0.633 #factor RG = F * RTH between gaussian and Tophat masses = 4^1/3/sqrt(2*np.pi)
#This is only relevant for astromodel = 0
[docs]
ALPHA_accretion_exponential = 0.79 #index of M(z) ~ e(-a z) for exponential growth. From Schneider+20 Eq (5). For accretion_model = 0
[docs]
EPSQ_accretion = 0.6 #to calculate EPS accretion. Variance ratio. For EPS, ie, accretion_model = 1
#EoR related
[docs]
alphaB = 4.31e-13/(1.0 + 0.67) #in cm3 s-1 at 1e4 K as usual
[docs]
ZMAX_Bubbles = 20. #where to begin bubbles, since at high z it's very noisy (need dcrit = 1.69 exact)
[docs]
sigmaT = 6.6524e-25 #Thomson cross section in cm^2, for tau_reio
[docs]
zHeIIreio = 3.0 #when we assume HeII fully reionizes, for tau_reio
[docs]
FLAG_DO_BUBBLES = False #whether to do xHI fluctuations (TODO. Global xHI is always calculated)
#RSD related
[docs]
MU_AVG = 0.6 #recovers (1+mu^2)^2 = 1.87, and very close for (1+mu^2) [for cross terms]
[docs]
MU_LoS = 1.0 #only fully LoS modes
#UVLF related
_MAGMAX_UV = 10. #max abs magnitude to avoid infs
_MAGMIN_Ha = -50. #max abs magnitude to avoid infs
[docs]
NZ_TOINT = 3 #how many zs around <z> with z_rms we use to predict. Only in HMF since the rest do not vary much.
[docs]
zeropoint_ABmag_ergsHz = 51.63 # pivot value for specific luminosity (erg/s/Hz) to magnitude conversion -- constant flat in wavelength
# SarahLibanore
[docs]
zmax_AstroBreak = 50. # max redshift above which we do not trust astro computation
[docs]
redshiftFactor_Visbal = 1.04 #max amount LW photons can redshift before being scattered, as in Visbal+1402.0882