Mass Function module

MassFunction provides mass function, $$ \frac{dn}{d\ln M} = f(\nu) \frac{M}{\rho_m} $$ where, $$ \nu = \frac{\delta_c}{D(z) \sigma_0(M)} $$ using Tinker et al., 2010, ApJ, 724, 878.

MassFunction class requre Sigma object,

  mf = mock.MassFunction(s)

and Sigma object requires PowerSpectrum object,

  s = mock.Sigma(ps)
  ps = mock.PowerSpectrum('../data/planck1_matterpower.dat')

mf = MassFunction(Sigma)

Operation Result
mf.dndlnM(M, z) Mass function $dn/d\ln M [(h^{-1} \mathrm{Mpc})^{-3}]$ at redshift $z$

In [1]:
%matplotlib inline

import math
import numpy as np
import matplotlib.pyplot as plt
import mockgallib as mock

mock.cosmology.set(0.31) # set omega_m
mock.power.init('../data/planck1_matterpower.dat')
mock.sigma.init()
mf = mock.MassFunction()

In [4]:
#logMmin = math.log(s.M_range[0])
#logMmax = math.log(s.M_range[1])
M = mock.sigma.M

z=0
dndlnM = [mf.dndlnM(mm, z) for mm in M]

plt.xscale('log')
plt.yscale('log')
plt.xlabel('$M$')
plt.ylabel('$dn/d\ln M$')

plt.plot(M, dndlnM, 'r-')


Out[4]:
[<matplotlib.lines.Line2D at 0x11248eb00>]

In [1]:
%%html
<style>table {float:left}</style>