In [2]:
f
import numpy as np
f = open('massprior.txt', 'w')
g = Grid()
for z in g.redshifts:
print z
h=0.73
mmin=10.2358590918
mmax=14.3277327776
mf = hmf.MassFunction(z=z, Mmin=mmin, Mmax=mmax,
cosmo_model=hmf.cosmo.WMAP5,
hmf_model=hmf.fitting_functions.Tinker10)
mass = mf.m * h
prob = mf.dndm / np.trapz(mf.dndm, x=mf.m * h)
for i in xrange(len(mass)):
f.write('{} {} {}\n'.format(z, mass[i], prob[i]))
f.close()
In [ ]: