main.evolve¶
-
main.
evolve
(in_spec_elec=None, in_spec_phot=None, rate_func_N=None, rate_func_eng=None, DM_process=None, mDM=None, sigmav=None, lifetime=None, primary=None, struct_boost=None, start_rs=None, end_rs=4, helium_TLA=False, reion_switch=False, reion_rs=None, photoion_rate_func=None, photoheat_rate_func=None, xe_reion_func=None, init_cond=None, coarsen_factor=1, backreaction=True, compute_fs_method='old', mxstep=1000, rtol=0.0001, use_tqdm=True)¶ Main function computing histories and spectra.
Parameters: - in_spec_elec :
Spectrum
, optional Spectrum per injection event into electrons.
in_spec_elec.rs
of theSpectrum
must be the initial condition.- in_spec_phot :
Spectrum
, optional Spectrum per injection event into photons.
in_spec_phot.rs
of theSpectrum
must be the initial condition.- rate_func_N : function, optional
Function returning number of injection events per volume per time.
- rate_func_eng : function, optional
Function returning energy injected per volume per time.
- DM_process : {‘swave’, ‘decay’}, optional
Dark matter process to use.
- sigmav : float, optional
Thermally averaged cross section for
DM_process == 'swave'
.- lifetime : float, optional
Decay lifetime for
DM_process == 'decay'
.- primary : string, optional
Primary channel of annihilation/decay. Refer to
pppc.chan_list
for complete list. Use'elec_delta'
or'phot_delta'
for delta function injections of a pair of photons/an electron-positron pair.- struct_boost : function, optional
Energy injection boost factor due to structure formation.
- start_rs : float, optional
Starting redshift (1+z) to evolve from. Default is 1+z = 3000. Specify only for use with DM_process initialize. Otherwise, initialize in_spec_elec.rs and/or in_spec_phot.rs directly.
- end_rs : float, optional
Final redshift (1+z) to evolve to. Default is 1+z = 4.
- reion_switch : bool
Reionization model included if true.
- helium_TLA : bool
If True, the TLA is solved with helium.
- reion_rs : float, optional
Redshift (1+z) at which reionization effects turn on.
- photoion_rate_func : tuple of functions, optional
Functions take redshift 1+z as input, return the photoionization rate in s^-1 of HI, HeI and HeII respectively. If not specified, defaults to darkhistory.history.reionization.photoion_rate.
- photoheat_rate_func : tuple of functions, optional
Functions take redshift 1+z as input, return the photoheating rate in s^-1 of HI, HeI and HeII respectively. If not specified, defaults to darkhistory.history.reionization.photoheat_rate.
- xe_reion_func : function, optional
Specifies a fixed ionization history after reion_rs.
- init_cond : tuple of floats
Specifies the initial (xH, xHe, Tm). Defaults to RECFAST if None.
- coarsen_factor : int
Coarsening to apply to the transfer function matrix.
- backreaction : bool
If False, uses the baseline TLA solution to calculate f_c(z). Default is True.
- mxstep : int, optional
The maximum number of steps allowed for each integration point. See scipy.integrate.odeint for more information.
- rtol : float, optional
The relative error of the solution. See scipy.integrate.odeint for more information.
- use_tqdm : bool, optional
Uses tqdm if true.
- in_spec_elec :