Hod
is the standard Halo Ocupation Distribution (HOD):
ncen(M,z)=12erf[log10M−log10MminσlogM]
nsat(M,z)=(M−M0M1)α
The redshift dependence is characterised by polynomials, log10Mmin(z)=c0+c1(z−z0)+c2(z−z0)2+c3(z−z0)3, where z0=0.5 is an arbitray fiducial redshift. The result does not depend on the choise of z0.
σlogM(z)=c4+c5(z−z0)M0(z)=Mmin(z)log10M1(z)=c6+c7(z−z0)α(z)=c8+c9(z−z0)hod = Hod()
Operation | Result |
---|---|
len(hod) | length of the HOD coefficients ci |
hod[i] | ith coefficient ci |
hod.get_coef() | an array of all coefficients c |
hod.set_coef(coef) | set all coefficients to those in an array coef |
hod.logMmin(z) | log10Mmin(z) |
hod.sigma(z) | σlogM(z) |
hod.logM1(z) | log10M1(z) |
hod.alpha(z) | α(z) |
hod.ncen(M,z) | probability of having a central galaxy |
hod.nsat(M,z) | mean number of satellite galaxies if the halo has a central |
%matplotlib inline
import math
import numpy as np
import matplotlib.pyplot as plt
import mockgallib as mock
hod = mock.Hod()
hod
# set coefficient
hod.set_coef([12.0, 0.5, 0, 0, 1.0, 0.0, 13.0, 0.0, 1.5, 0.0])
hod[0]= 11.5
print(hod)
# plot HOD parameters
z = np.arange(0.4, 1.2, 0.01)
logMmin = [hod.logMmin(zz) for zz in z]
sigma = [hod.sigma(zz) for zz in z]
logM1 = [hod.logM1(zz) for zz in z]
alpha = [hod.alpha(zz) for zz in z]
plt.plot(z, logMmin, 'r-', label='logMmin')
plt.plot(z, sigma, 'r--', label='sigma')
plt.plot(z, logM1, 'b-', label='logM1')
plt.plot(z, alpha, 'b--', label='alpha')
plt.xlabel('redshift $z$')
plt.ylabel('HOD parameters')
plt.legend(loc='center right')
plt.show();
z = 0.5
logMmin = 10
logMmax = 16
M = np.exp(np.arange(10, 15, 0.1)*math.log(10))
ncen = [hod.ncen(MM, z) for MM in M]
nsat = [hod.nsat(MM, z) for MM in M]
plt.plot(M, ncen, 'r-', label='ncen')
plt.plot(M, nsat, 'b--', label='nsat')
plt.xlabel('Halo mass $M$')
plt.ylabel('number of HOD galaxies in a halo')
plt.xscale('log')
plt.yscale('log')
plt.legend(loc='upper left')
plt.show();
%%html
<style>
table {float:left}
</style>