A semi-numerical cosmological simulation code for the radio 21-cm signal including exotic sources of energy injection.
In this code we introduce several features to 21cmFAST12 related to dark matter energy injection via s-wave annihilation or decay. The energy deposition can be evaluated in two ways, either using the DarkHistory34 package or with template functions. Future updates will include other sources of energy injection not necessarily related to dark matter.
In the future, this code should be merged with the main branch of 21cmFAST.
To install exo21cmFAST, download the repository, on your terminal go to the main folder (containing the file config.py
) and run
$ pip install -e .
To use DarkHistory (which is not necessary depending on what you want to do) you need to download the package (see information on the DarkHistory documentation) and add these two lines to your PYTHONPATH
:
$ export PYTHONPATH=$PYTHONPATH:<folder containing DarkHistory>
$ export PYTHONPATH=$PYTHONPATH:<folder containing DarkHistory>/DarkHistory
The physics behind exotic energy injection and notations and introduced in this section. For more information please read the companion paper improving on a previous study5.
Exotic energy is added to the simulation assuming a smooth homogeneous energy injection rate per number of baryon
and several deposition fractions quantifying how much of the injected energy is deposited in the intergalactic medium at a given time. Here
to the classical sources. Here
In the case of dark matter decay the injected energy can be written in terms of the average dark matter energy density today
In case of DM annihilation the relevant parameters are the annihilation cross-section
WARNING 1: This is the smooth energy injection rate. The true energy injection rate depends on the average of the squared density
WARNING 2: Dark matter annihilation and decay produce Standard Model particles that shower to electrons and photons which, in turn, electromagnetically interact with the intergalactic medium. The deposion fractions then depend on the Standard Model primary species that are produced. As the energy of the electrons and photons at the end of the chain impacts on the energy deposition, the deposition fraction also depends on the mass of the decaying or annihilating particles.
Based on observations of the evolution of the deposition fractions with the redshifts, one can often find
(at least for dark matter decay and annihilation). Pre-implemented functions in the code are
The new features are implemented in the run_lightcone
function which accepts several new arguments. In addition, we provide new input parameters in the astro_params
and flag_options
arguments related to the exotic energy injection and its treatment. All new inputs are listed below (for more information go to src/inputs.py
and src/wrapper.py
).
These parameters are the astrophysical quantities which can be included in an inference analysis (a MCMC with 21cmMC or a Fisher forecast with 21cmCAST)
The numerical parameters related to the dark matter properties (the only necessary ones when using DarkHistory)
-
DM_LOG10_MASS
:$\log_{10}(m_\chi / {\rm eV})$ mass of the dark matter particle -
DM_LOG10_SIGMAV
:$\log_{10}(\left<\sigma v\right> /{\rm cm^3 / s^{-1}})$ annihilation cross section -
DM_LOG10_LIFETIME
:$\log_{10}(\tau / {\rm s})$ lifetime of decaying dark matter - (
DM_DECAY_RATE
:$\Gamma/{\rm s^{-1}} = {\rm s} / \tau$ decay rate of decaying dark matter). NeedDM_USE_DECAY_RATE
set toTrue
in the Flag options to be used (otherwise the value ofDM_LOG10_LIFETIME
is used)
The numerical parameters related to the effective parametrisation
-
DM_FHEAT_APPROX_PARAM_LOG10_F0
:$\log_{10}(f_0)$ -
DM_FHEAT_APPROX_PARAM_A
:$a$ -
DM_FHEAT_APPROX_PARAM_B
:$b$ -
DM_LOG10_FION_H_OVER_FHEAT
:$\log_{10}(c_1) = \log_{10}(f_{\rm ion., HII} / f_{\rm heat})$ -
DM_LOG10_FION_HE_OVER_FHEAT
:$\log_{10}(c_2) = \log_{10}(f_{\rm ion., HeII} / f_{\rm heat})$ -
DM_LOG10_FEXC_OVER_FHEAT
:$\log_{10}(c_3) = \log_{10}(f_{\rm exc.} / f_{\rm heat})$ -
LOG10_TK_at_Z_HEAT_MAX$
:$T_{\rm k}(z_{\rm init})$ initial condition for the temperature -
LOG10_XION_at_Z_HEAT_MAX$
:$x_{\rm e}(z_{\rm init})$ initial condition for the electron fraction
General flags
USE_DM_ENERGY_INJECTION
: boolean ifTrue
turns on exotic energy injection
Flags related to DarkHistory:
-
DM_PROCESS
: string$\in$ ['swave', 'decay', 'none'] specify the type of enerjy injection -
DM_PRIMARY
: string$\in$ ['elec_delta', 'e', 'phot_delta', 'gamma', 'mu', ...] (see DarkHistory documentation for all the possibillities) primary particles in which dark matter decays or annihilates -
DM_BOOST
: string$\in$ ['erfc', 'einasto_subs', 'einasto_no_subs', 'NFW_subs', 'NFW_no_subs'] preimplemented boost function$\mathcal{B}(z)$ for dark matter annihilation -
DM_FS_METHOD
: string$\in$ ['He', 'no_He', 'He_recomb'] method to compute the deposition fractions (see DarkHistory documentation for more details) -
DM_BACKREACTION
: boolean ifTrue
turns on exotic energy injection -
DM_USE_DECAY_RATE
: boolean ifTrue
usesDM_DECAY_RATE
instead ofDM_LOG10_LIFETIME
to evaluate the energy injection from dark matter decay
Flags related to the effective parametrisation:
-
USE_DM_EFFECTIVE_DEP_FUNCS
: boolean ifTrue
bypasses DarkHistory and uses the effective parametrisation for the deposition functions -
DM_FHEAT_APPROX_SHAPE
: integer or string$\in$ [0: 'none', 1: 'constant', 2: 'exponential', 3: 'schechter'] functional form of the deposition fraction into heat$F(z)$ -
USE_DM_CUSTOM_F_RATIOS
: boolean ifTrue
usesDM_LOG10_FION_H_OVER_FHEAT
,DM_LOG10_FION_HE_OVER_FHEAT
,DM_LOG10_FION_HE_OVER_FHEAT
to relate the other deposition fractions to$f_{\rm heat}$ . IfFalse
uses predefined values obtained from scans of DarkHistory results -
USE_CUSTOM_INIT_COND
: boolean forces initial conditions toLOG10_TK_at_Z_HEAT_MAX
andLOG10_XION_at_Z_HEAT_MAX
. IfUSE_CUSTOM_INIT_COND
isFalse
andFORCE_DEFAULT_INIT_COND
isFalse
the initial conditions are set either by vanilla RECFAST ifUSE_DM_EFFECTIVE_DEP_FUNCS
isFalse
or by the result of the DarkHistory run otherwise. Cannot be set toTrue
ifFORCE_DEFAULT_INIT_COND
isTrue
as well -
FORCE_DEFAULT_INIT_COND
: boolean forces the initial conditions to be that of vanilla RECFAST (even if exotic energy injection has happened before redshift$z_{\rm init}=$ Z_HEAT_MAX
). IfUSE_CUSTOM_INIT_COND
isFalse
andFORCE_DEFAULT_INIT_COND
isFalse
the initial conditions are set either by vanilla RECFAST ifUSE_DM_EFFECTIVE_DEP_FUNCS
isFalse
or by the result of the DarkHistory run otherwise. Cannot be set to True ifUSE_CUSTOM_INIT_COND
isTrue
as well.
coarsen_factor
: integer redifines the redshift steps to match with the table of DarkHistory. Note that if we use energy deposition through the templates this value can be arbitrary. Be default it is set to 16 to match with the nominal redshift step definition of 21cmFAST.verbose_ntbk
: boolean ifTrue
outputs more information during the run, which can be useful when running 21cmFAST on small boxed in a notebook.output_exotic_data
: boolean ifTrue
gives a second output to therun_lightcone()
function in the form of a dictionnary. This dictionnary contains the deposition fractions'f'
, electron fraction'x'
, gaz temperature'Tm'
at every redshifts in'z'
.heating_rate_output
: string defines a file where to save the the heating rate due to exotic energy injection and astrophycial energy injection. If nothing specified, the heating rates are not saved.
Some examples are provided in exo21cmFAST/examples
and play the role of small tutorials. In particular see example_notebook.py
.
The most simple code that can be run for a test assuming dark matter decyaing into
import py21cmfast as p21f
lightcone = p21f.run_lightcone(
redshift = 5,
user_params = {"BOX_LEN": 250, "HII_DIM": 128},
astro_params = {"DM_LOG10_MASS": 8.0, "DM_LOG10_LIFETIME": 26.0},
flag_options = {
"USE_DM_ENERGY_INJECTION" : True,
"USE_TS_FLUCT" : True,
"DM_PROCESS" : 'decay',
"DM_PRIMARY" : 'elec_delta'
},
direc='./cache',
)
lightcone.save(fname = "my_ligthcone.h5")
A more complete example is also provided in example_run.py
.
Once the lightcone is created, it can be analysed with different tools. See 21cmCAST documentation for an example.
If you use exo21cmFAST or parts of the new functionnalities not already present in 21cmFAST please cite
- Gaetan Facchinetti, Laura Lopez-Honorez, Andrei Mesinger, Yuxiang Qin, 21cm signal sensitivity to dark matter decay (in prep.)
Footnotes
-
Andrei Mesinger, Steven Furlanetto, and Renyue Cen, 21cmFAST: A Fast, Semi-Numerical Simulation of the High-Redshift 21-cm Signal [arXiv:1003.3878] ↩
-
Andrei Mesinger and Steven Furlanetto, Efficient Simulations of Early Structure Formation and Reionization [arXiv:0704.0946] ↩
-
Hongwan Liu, Gregory W. Ridgway, Tracy R. Slatyer, DarkHistory: A code package for calculating modified cosmic ionization and thermal histories with dark matter and other exotic energy injections [arXiv:1904.09296] ↩
-
Yitian Sun, Tracy R. Slatyer, Modeling early-universe energy injection with Dense Neural Networks [arXiv:2207.06425] ↩
-
Laura Lopez-Honorez, Olga Mena, Ángeles Moliné, Sergio Palomares-Ruiz, Aaron C. Vincent, The 21 cm signal and the interplay between dark matter annihilations and astrophysical processes [arXiv:1603.06795] ↩