Package cosmolopy :: Module reionization

Module reionization

source code

Routines related to the reionization history of the IGM.
Functions
 
delta_lambda_delta_dl(z, delta_dl, **cosmo)
The Lyman-alpha wavelength shift given light-travel distance.
source code
 
recomb_rate_coeff_HG(temp, species, case)
Recombination rate coefficients for HII, HeII and HeIII.
source code
 
ionization_from_collapse(z, coeff_ion, temp_min, passed_min_mass=False, **cosmo)
The ionized fraction of the universe using perturbation theory.
source code
 
quick_ion_col_function(coeff_ion, temp_min, passed_min_mass=False, zmax=20.0, zmin=0.0, zstep=0.1, **cosmo)
Return a function giving ionization_from_collapse as a function of redshift (based on interpolation).
source code
 
clumping_factor_BKP(z)
Clumping factor as a function of redshift used by Bagla et al. 2009.
source code
 
clumping_factor_HB(z, beta=2)
Clumping factor as a function of redshift used by Haiman & Bryan (2006).
source code
 
clumping_factor_Chary(z)
Clumping factor as a function of redshift estimated from Chary (2008)
source code
 
integrate_ion_recomb(z, ion_func, clump_fact_func, xHe=1.0, temp_gas=10000.0, alpha_B=None, bubble=True, **cosmo)
Integrate IGM ionization and recombination given an ionization function.
source code
 
integrate_ion_recomb_collapse(z, coeff_ion, temp_min=10000.0, passed_min_mass=False, temp_gas=10000.0, alpha_B=None, clump_fact_func=<function clumping_factor_BKP at 0xa57abfc>, **cosmo)
fraction. Integrates an ODE describing IGM ionization and recombination rates.
source code
 
ionization_from_luminosity(z, ratedensityfunc, xHe=1.0, rate_is_tfunc=False, ratedensityfunc_args=(), method='romberg', **cosmo)
Integrate the ionization history given an ionizing luminosity function, ignoring recombinations.
source code
 
integrate_optical_depth(x_ionH, x_ionHe, z, **cosmo)
The electron scattering optical depth given ionized filling factor vs. redshift.
source code
 
optical_depth_instant(z_r, x_ionH=1.0, x_ionHe=1.0, z_rHe=None, return_tau_star=False, verbose=0, **cosmo)
Optical depth assuming instantaneous reionization and a flat universe.
source code
 
nDotRecMHR(z, clump_fact=1.0)
Recombination rate density from Madau, Haardt, & Rees 1999.
source code
Variables
  __package__ = 'cosmolopy'
Function Details

delta_lambda_delta_dl(z, delta_dl, **cosmo)

source code 

The Lyman-alpha wavelength shift given light-travel distance.

Wavelengths are in Angstroms.

Returns lambda(z), lambda(z - Deltaz), z, z - Deltaz

recomb_rate_coeff_HG(temp, species, case)

source code 

Recombination rate coefficients for HII, HeII and HeIII.

Parameters

temp is the temperature in K

species is 'H', 'He0', or 'He1'.

case is 'A' or 'B'.

Notes

From Hui and Gnedin (1997MNRAS.292...27H).

Valid for He0 for temperatures between 5e3 and 5e5 K.

ionization_from_collapse(z, coeff_ion, temp_min, passed_min_mass=False, **cosmo)

source code 

The ionized fraction of the universe using perturbation theory.

Parameters

z:

Redshift values at which to evaluate the ionized fraction.

coeff_ion:

Coefficient giving the ratio between collapse fraction and ionized fraction (neglecting recombinations and assuming all photons are instantly absorbed).

temp_min:

Either the minimum Virial temperature (in Kelvin) or minimum mass of halos (in solar masses) contributing to reionization.

passed_temp_min: Boolean

Set this to True if you pass a minimum mass, False (default) if you pass a minimum Virial temperature.

cosmo: dict

Cosmological parameters.

Notes

See Furlanetto et al. (2004ApJ...613....1F).

quick_ion_col_function(coeff_ion, temp_min, passed_min_mass=False, zmax=20.0, zmin=0.0, zstep=0.1, **cosmo)

source code 

Return a function giving ionization_from_collapse as a function of redshift (based on interpolation).

Calling the resulting function is much faster than evaluating ionization_from_collapse.

clumping_factor_BKP(z)

source code 

Clumping factor as a function of redshift used by Bagla et al. 2009.

See Bagla, Kulkarni & Padmanabhan (2009MNRAS.397..971B).

clumping_factor_HB(z, beta=2)

source code 

Clumping factor as a function of redshift used by Haiman & Bryan (2006).

See Haiman & Bryan (2006ApJ...650....7H).

clumping_factor_Chary(z)

source code 

Clumping factor as a function of redshift estimated from Chary (2008)

Chary, R.-R. 2008, ApJ, 680, 32 (2008ApJ...680...32C) shows a nice plot (Figure 2a) of clumping factor for neutral and ionized gas with and without halos included and adopts the clumping factor for ionized gas without source halos (but with other halos), which rises (apparently, from the graph) as a constant powerlaw from ~2 and z=15 to 6 at z=8, steepens to reach 8 at z=7, and ~17 at z=5.

This function returns the values of a piecewise powerlaw (as a function of redshift) interpolated/extrapolated through those points.

integrate_ion_recomb(z, ion_func, clump_fact_func, xHe=1.0, temp_gas=10000.0, alpha_B=None, bubble=True, **cosmo)

source code 

Integrate IGM ionization and recombination given an ionization function.

Parameters:

z: array

The redshift values at which to calculate the ionized fraction. This array should be in reverse numerical order. The first redshift specified should be early enough that the universe is still completely neutral.

ion_func:

A function giving the ratio of the total density of emitted ionizing photons to the density hydrogen atoms (or hydrogen plus helium, if you prefer) as a function of redshift.

temp_gas:

Gas temperature used to calculate the recombination coefficient if alpha_b is not specified.

alpha_B:

Optional recombination coefficient in units of cm^3 s^-1. In alpha_B=None, it is calculated from temp_gas.

clump_fact_func: function

Function returning the clumping factor when given a redshift, defined as <n_HII^2>/<n_HII>^2.

cosmo: dict

Dictionary specifying the cosmological parameters.

Notes:

We only track recombination of hydrogen, but if xHe > 0, then the density is boosted by the addition of xHe * nHe. This is eqiuvalent to assuming the the ionized fraction of helium is always proportional to the ionized fraction of hydrogen. If xHe=1.0, then helium is singly ionized in the same proportion as hydrogen. If xHe=2.0, then helium is fully ionized in the same proportion as hydrogen.

We assume, as is fairly standard, that the ionized fraction is contained in fully ionized bubbles surrounded by a fully neutral IGM. The output is therefore the volume filling factor of ionized regions, not the ionized fraction of a uniformly-ionized IGM.

I have also made the standard assumption that all ionized photons are immediately absorbed, which allows the two differential equations (one for ionization-recombination and one for emission-photoionizaion) to be combined into a single ODE.

integrate_ion_recomb_collapse(z, coeff_ion, temp_min=10000.0, passed_min_mass=False, temp_gas=10000.0, alpha_B=None, clump_fact_func=<function clumping_factor_BKP at 0xa57abfc>, **cosmo)

source code 
IGM ionization state with recombinations from halo collapse

fraction. Integrates an ODE describing IGM ionization and recombination rates.

z: array

The redshift values at which to calculate the ionized fraction. This array should be in reverse numerical order. The first redshift specified should be early enough that the universe is still completely neutral.

coeff_ion:

The coefficient converting the collapse fraction to ionized fraction, neglecting recombinations. Equivalent to the product (f_star * f_esc_gamma * N_gamma) in the BKP paper.

temp_min:

See docs for ionization_from_collapse. Either the minimum virial temperature or minimum mass of halos contributing to reionization.

passed_temp_min:

See documentation for ionization_from_collapse.

temp_gas:

Gas temperature used to calculate the recombination coefficient if alpha_b is not specified.

alpha_B:

Optional recombination coefficient in units of cm^3 s^-1. In alpha_B=None, it is calculated from temp_gas.

clump_fact_func: function

Function returning the clumping factor when given a redshift.

cosmo: dict

Dictionary specifying the cosmological parameters.

We assume, as is fairly standard, that the ionized fraction is contained in fully ionized bubbles surrounded by a fully neutral IGM. The output is therefore the volume filling factor of ionized regions, not the ionized fraction of a uniformly-ionized IGM.

I have also made the standard assumption that all ionized photons are immediately absorbed, which allows the two differential equations (one for ionization-recombination and one for emission-photoionizaion) to be combined into a single ODE.

ionization_from_luminosity(z, ratedensityfunc, xHe=1.0, rate_is_tfunc=False, ratedensityfunc_args=(), method='romberg', **cosmo)

source code 

Integrate the ionization history given an ionizing luminosity function, ignoring recombinations.

Parameters

ratedensityfunc: callable
function giving comoving ionizing photon emission rate density, or ionizing emissivity (photons s^-1 Mpc^-3) as a function of redshift (or time).
rate_is_tfunc: boolean
Set to true if ratedensityfunc is a function of time rather than z.

Notes

Ignores recombinations.

The ionization rate is computed as ratedensity / nn, where nn = nH + xHe * nHe. So if xHe is 1.0, we are assuming that helium becomes singly ionized at proportionally the same rate as hydrogen. If xHe is 2.0, we are assuming helium becomes fully ionizing at proportionally the same rate as hydrogen.

The returened x is therefore the ionized fraction of hydrogen, and the ionized fraction of helium is xHe * x.

integrate_optical_depth(x_ionH, x_ionHe, z, **cosmo)

source code 

The electron scattering optical depth given ionized filling factor vs. redshift.

Parameters

x_ionH: array

Ionized fraction of hydrogen as a function of z. Should be [0,1].

x_ionHe: array

Set x_ionHE to X_HeII + 2 * X_HeIII, where X_HeII is the fraction of helium that is singly ionized, and X_HeII is the fraction of helium that is doubly ionized. See Notes below.
z: array
Redshift values at which the filling factor is specified.

cosmo: cosmological parameters

uses: 'X_H' and/or 'Y_He', plus parameters needed for hubble_z

Returns

tau: array
The optical depth as a function of z.

Notes

The precision of your result depends on the spacing of the input arrays. When in doubt, try doubling your z resolution and see if the optical depth values have converged.

100% singly ionized helium means x_ionHe = 1.0, 100% doubly ionized helium means x_ionHe = 2.0

If you want helium to be singly ionized at the same rate as hydrogen, set x_ionHe = x_ionH.

If you want helium to be doubly ionized at the same rate as hydrogen is ionized, set x_ionHe = 2 * x_ionH.

optical_depth_instant(z_r, x_ionH=1.0, x_ionHe=1.0, z_rHe=None, return_tau_star=False, verbose=0, **cosmo)

source code 

Optical depth assuming instantaneous reionization and a flat universe.

Calculates the optical depth due to Thompson scattering off free electrons in the IGM.

Parameters

z_r:
Redshift of instantaneos reionization.
x_ionH:
Ionized fraction of hydrogen after reionization.
x_ionHe:
Set to 2.0 for fully ionized helium. Set to 1.0 for singly ionized helium. Set to 0.0 for neutral helium. This value equals X_HeII + 2 * X_HeIII after z_r (where X_HeII is the fraction of helium that is singly ionized, and X_HeII is the fraction of helium that is doubly ionized).
z_rHe (optional):
Redshift of instantaneos Helium reionization, i.e. when helium becomes doubly ionized. z_rHe should be less than z_r.
return_tau_star: Boolean
whether or not to return the value of tau_star, as defined by Griffiths et al. (arxiv:astro-ph/9812125v3)

cosmo: cosmological parameters

Returns

tau: array
optical depth to election

tau_star: array or scalar

Notes

See, e.g. Griffiths et al. (arxiv:astro-ph/9812125v3, note that the published version [ 1999MNRAS.308..854G] has typos)

nDotRecMHR(z, clump_fact=1.0)

source code 

Recombination rate density from Madau, Haardt, & Rees 1999.

Assumes hydrogen is fully ionized.

Units are s^-1 coMpc^-3.