rabacus.cosmology.mass_function package

Submodules

rabacus.cosmology.mass_function.mass_function module

A halo mass function module. See the following reference for a discussion, http://adsabs.harvard.edu/abs/2007ApJ...671.1160L

class rabacus.cosmology.mass_function.mass_function.MassFunction(cosmo, tf)[source]

A mass function class. During initialization the normalization of the power spectrum is set to match the sigma8 from cosmo.

Args:

cosmo (Cosmology): an instance of the cosmology class.

tf (class): an instance of a transfer function class. For example, TransferBBKS.

cosmo is an instance of Cosmology and tf is an instance of TransferFunction

D1(z)[source]

Linear growth function from cosmo

Delta2k(k, z)[source]

Dimensionless power spectrum,

Args:

k (real or array): wavenumber.

z (real): redshift

\Delta^2(k,z) = \frac{k^3}{2 \pi^2} P(k,z)

Pk(k, z)[source]

Power spectrum from tf normalized to match sigma8 from cosmo.

W2kR(k, R)[source]

The square of the fourier transform of a real space spherical top hat filter.

Args:

k (real or array): wavenumber.

R (real): filter scale.

W^2 =  \left[ \frac{ 3 j_1(x) }{ x } \right]^2, \, x = k R \\
j_1 = [\sin(x) - x \cos(x)] \, x^{-2}

W2lnkR(lnk, R)[source]

The square of the fourier transform of a real space spherical top hat filter as a function of the natural log of k.

Args:

lnk (real or array): natural log of wavenumber, ln( k [h/Mpc] ).

R (real): filter scale.

WkR(k, R)[source]

The fourier transform of a real space spherical top hat filter.

Args:

k (real or array): wavenumber.

R (real): filter scale.

W =  \frac{ 3 j_1(x) }{ x }, \, x = k R \\
j_1 = [\sin(x) - x \cos(x)] \, x^{-2}

calc_mf(z, fit='Warren06')[source]

Calculate mass function from high to low mass. The only redshift dependence is in f(sigma) via a rescaling of sigma

delta_cz(z)[source]

Redshift dependent critical collapse value

Args:
z (real): redshift

\delta_c(z) = \delta_{c,0} / D_1(z)

dsig2_dk(k, R, z)[source]

Integrand for calculation of sigma^2. Inputs k and R must have units.

Args:

k (real or array): wavenumber.

R (real): filter scale.

z (real): redshift

\frac{d\sigma^2}{dk} = \frac{ \Delta^2(k,z) W^2(k,R) }{ k }

dsig2_dlnk(lnk, R, z)[source]

Input is ln(k) which is unitless but k must have units of h/Mpc

Args:

lnk (real or array): wavenumber, ln( k [h/Mpc] ).

R (real): filter scale.

z (real): redshift

\frac{d\sigma^2}{d \ln k} = \Delta^2(k,z) W^2(k,R)

dsig2_dlogk(logk, R, z)[source]

Input is log10(k) which is unitless but k must have units of h/Mpc

Args:

logk (real or array): wavenumber, log10( k [h/Mpc] )

R (real): filter scale.

z (real): redshift

\frac{d\sigma^2}{d \log k} = \ln(10) \Delta^2(k,z) W^2(k,R)

frac_mass(sig, delta_c)[source]

fraction of mass in halos per unit dln(1/sigma)

map_sig2_R(nbins=200)[source]

Map out the relationship between sigma^2 and R. In this routine we map out the relationship at z=0 and assume that different redshifts can be accomodated through a simple scaling with the growth function D1(z).

mult_func(sigma_in, z, fit='Warren06')[source]

The multiplicity function f(\sigma). This function determines the shape of the mass function given the variation of \sigma with scale. The variable fit determines the form of the multiplicity function. A convenient variable is \nu = \delta_{c,0} / \sigma. The following values for fit lead to the following multiplicity funcitons,

n_eff_approx(vol, dlogM, z)[source]
sigma2_M(M, z)[source]

Variance of density field smoothed on scale V

Args:

V (real): filter scale.

z (real): redshift

V = \frac{M}{\rho_{c,0} \, \Omega_M}, \, 
R = \left( \frac{3 V}{4 \pi} \right)^{1/3},  \\

\sigma^2(R) = \int \Delta^2(k,z) W^2(k,R) d \ln k

sigma2_R(R, z, method='romberg')[source]

Variance of density field smoothed on scale R

Args:

R (real): filter scale.

z (real): redshift

\sigma^2(R) = \int \Delta^2(k,z) W^2(k,R) d \ln k

sigma2_V(V, z)[source]

Variance of density field smoothed on scale V

Args:

V (real): filter scale.

z (real): redshift

R = \left( \frac{3 V}{4 \pi} \right)^{1/3},  \\

\sigma^2(R) = \int \Delta^2(k,z) W^2(k,R) d \ln k

Module contents

Mass function package.