Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions nbodykit/source/catalog/tests/test_hod.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,30 @@ def test_hod_cm(comm):
# compute the power
r = FFTPower(hod.to_mesh(Nmesh=128), mode='2d', Nmu=5, los=[0,0,1])

@MPITest([1, 4])
def test_hod_cm_200c(comm):

redshift = 0.55
cosmo = cosmology.Planck15
BoxSize = 512

# lognormal particles
Plin = cosmology.LinearPower(cosmo, redshift=redshift, transfer='EisensteinHu')
source = LogNormalCatalog(Plin=Plin, nbar=3e-3, BoxSize=BoxSize, Nmesh=128, seed=42, comm=comm)

# run FOF
r = FOF(source, linking_length=0.2, nmin=20)
halos = r.to_halos(cosmo=cosmo, redshift=redshift, particle_mass=1e12, mdef='200c', posdef='cm')

# make the HOD catalog from halotools catalog
hod = halos.populate(Zheng07Model, seed=42)

# RSD offset in 'z' direction
hod['Position'] += hod['VelocityOffset'] * [0, 0, 1]

# compute the power
r = FFTPower(hod.to_mesh(Nmesh=128), mode='2d', Nmu=5, los=[0,0,1])

@MPITest([1, 4])
def test_hod_peak(comm):

Expand Down