Home | Trees | Indices | Help |
---|
|
Perturbation theory and the power spectrum routines.
This module relies largely on power.c from Eisenstein & Hu (1999 ApJ 511 5)
http://background.uchicago.edu/~whu/transfer/transferpage.html
See notes in cosmolopy.EH.
Functions | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Variables | |
havepower = True
|
|
powererror = None
|
|
havetffit = True
|
|
tffiterror = None
|
|
__package__ =
|
Function Details |
The transfer function as a function of wavenumber k. Parameters
ReturnsIf baryonic_effects is true, returns a tuple of arrays matching the shape of k:
Otherwise, returns a tuple of arrays matching the shape of k: (the transfer function for CDM + Baryons, the transfer function for CDM + Baryons + Neutrinos). NotesUses transfer function code power.c from Eisenstein & Hu (1999 ApJ 511 5). For baryonic effects, uses tf_fit.c from Eisenstein & Hu (1997 ApJ 496 605). http://background.uchicago.edu/~whu/transfer/transferpage.html |
Cosmological perturbation growth factor, normalized to 1 at z = 0. Approximate forumla from Carol, Press, & Turner (1992, ARA&A, 30, 499), "good to a few percent in regions of plausible Omega_M, Omega_Lambda". This is proportional to D_1(z) from Eisenstein & Hu (1999 ApJ 511 5) equation 10, but the normalization is different: fgrowth = 1 at z = 0 and D_1(z) = \frac{1+z_\mathrm{eq}}{1+z} as z goes to infinity. To get D_1 one would just use D_1(z) = (1+z_\mathrm{eq}) \mathtt{fgrowth}(z,\Omega_{M0}, 1) (see EHequation 1 for z_eq). \mathtt{fgrowth} = \frac{D_1(z)}{D_1(0)} Setting unnormed to true turns off normalization. Note: assumes Omega_lambda_0 = 1 - Omega_M_0! |
The k-space Fourier transform of a spherical tophat. Parameters
Note: k and r need to be in the same units. Returns
|
The k-space Fourier transform of an isotropic three-dimensional gaussian Parameters
Note: k and r need to be in the same units. Returns
|
Sigma statistic of order j for gaussian field of variancea r at redshift z. Returns sigma and the error on sigma. Parameters
Returns
Notes:: Eq. (152) of Matsubara (2003) sigma_j(R,z) = sqrt{int_0^infty frac{k^2}{2 pi^2}~P(k, z)~k^{2j} tilde{w}_k^2(k, R)~dk} = sigma_j(R,0) left(frac{D_1(z)}{D_1(0)}right) |
RMS mass fluctuations of a sphere of radius r at redshift z. Returns sigma and the error on sigma. Parameters
Returns
Notes\sigma(R,z) = \sqrt{\int_0^\infty \frac{k^2}{2 \pi^2}~P(k, z)~ \tilde{w}_k^2(k, R)~dk} = \sigma(R,0) \left(\frac{D_1(z)}{D_1(0)}\right) |
Normalize the power spectrum to the specified sigma_8. Returns the factor deltaSqr. |
The matter power spectrum P(k,z). Uses equation 25 of Eisenstein & Hu (1999 ApJ 511 5). Parametersk should be in Mpc^-1 Cosmological ParametersUses 'n', and either 'sigma_8' or 'deltaSqr', as well as, for transfer_function_EH, 'omega_M_0', 'omega_b_0', 'omega_n_0', 'N_nu', 'omega_lambda_0', and 'h'. NotesP(k,z) = \delta^2 \frac{2 \pi^2}{k^3} \left(\frac{c k}{h H_{100}}\right)^{3+n} \left(T(k,z) \frac{D_1(z)}{D_1(0)}\right)^2 Using the non-dependence of the transfer function on redshift, we can rewrite this as P(k,z) = P(k,0) \left( \frac{D_1(z)}{D_1(0)} \right)^2 which is used by sigma_r to the z-dependence out of the integral. |
The volume, radius, and dm/dr for a sphere of the given mass. Uses the mean density of the universe. Parameters
Returnsvolume in Mpc^3 radius in Mpc dmdr in Msun / Mpc |
The radius in Mpc of a sphere of the given mass. Parametersmass in Msun Returnsradius in Mpc NotesThis is a convenience function that calls volume_radius_dmdr and returns only the radius. |
The mass of a sphere of radius r in Mpc. Uses the mean density of the universe. |
The Virial temperature for a halo of a given mass. Calculates the Virial temperature in Kelvin for a halo of a given mass using equation 26 of Barkana & Loeb. The transition from neutral to ionized is assumed to occur at temp = 1e4K. At temp >= 10^4 k, the mean partical mass drops from 1.22 to 0.59 to very roughly account for collisional ionization. Parameters
|
The mass of a halo of the given Virial temperature. Uses equation 26 of Barkana & Loeb (2001PhR...349..125B), solved for T_vir as a function of mass. Parameters
Returns
NotesAt temp >= 10^4 k, the mean partical mass drops from 1.22 to 0.59 to very roughly account for collisional ionization. Examples>>> cosmo = {'omega_M_0' : 0.27, ... 'omega_lambda_0' : 1-0.27, ... 'omega_b_0' : 0.045, ... 'omega_n_0' : 0.0, ... 'N_nu' : 0, ... 'h' : 0.72, ... 'n' : 1.0, ... 'sigma_8' : 0.9 ... } >>> mass = virial_mass(1e4, 6.0, **cosmo) >>> temp = virial_temp(mass, 6.0, **cosmo) >>> print "Mass = %.3g M_sun" % mass Mass = 1.68e+08 M_sun >>> print round(temp, 4) 10000.0 |
Virial temperature from halo mass according to Haiman & Bryan (2006ApJ...650....7). z is the redshift. Units are Msun and kelvin. |
Halo mass from Virial temperature according to Haiman & Bryan (2006ApJ...650....7). z is the redshift. Units are Msun and kelvin. |
Convenience function to calculate collapse fraction inputs. Parameters
|
Fraction of mass contained in collapsed objects. Use sig_del to conveniently obtain sigma_min and delta_crit. See Examples velow. Parameters
NotesThe fraction of the mass in a region of mass m that has already collapsed into halos above mass m_min is: f_\mathrm{col} = \mathrm{erfc} \left[ \frac{\delta_c - \delta(m)} { \sqrt {2 [\sigma^2(m_\mathrm{min}) - \sigma^2(m)]}} \right] The answer isn't real if sigma_mass > sigma_min. Note that there is a slight inconsistency in the mass used to calculate sigma in the above formula, since the region deviates from the average density. Examples>>> import numpy >>> import perturbation as cp >>> cosmo = {'omega_M_0' : 0.27, ... 'omega_lambda_0' : 1-0.27, ... 'omega_b_0' : 0.045, ... 'omega_n_0' : 0.0, ... 'N_nu' : 0, ... 'h' : 0.72, ... 'n' : 1.0, ... 'sigma_8' : 0.9, ... 'baryonic_effects' : False ... } >>> fc = cp.collapse_fraction(*cp.sig_del(1e4, 0, **cosmo)) >>> print round(fc, 4) 0.7328 >>> fc = cp.collapse_fraction(*cp.sig_del(1e2, 0, **cosmo)) >>> print round(fc, 4) 0.8571 |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Tue Mar 27 20:49:14 2012 | http://epydoc.sourceforge.net |