In [14]:
from bigmali.grid import Grid
from bigmali.prior import MassPrior, TinkerPrior
In [15]:
g = Grid()
tp = TinkerPrior(g)
In [16]:
g.redshifts
Out[16]:
In [22]:
z = g.redshifts[2]
print z
In [23]:
masses = tp.fetch(z).rvs(10)
print masses
In [24]:
tp.pdf(masses, z)
Out[24]:
In [25]:
masses = tp.fetch(z).rvs(10)
print masses
In [36]:
tp.pdf(masses, 3.5)
Out[36]:
In [35]:
for i in masses:
print str(i) + ","
In [28]:
tp.pdf(2e16, z)
Out[28]:
In [29]:
tp.pdf(1e10, z)
Out[29]:
In [30]:
tp.pdf(masses, 0)
Out[30]:
In [31]:
tp.pdf(masses, 0.184210526316)
Out[31]:
In [52]:
import numpy as np
np.mean(tp.rvs(0, 10**6))
Out[52]:
In [ ]: