Populates halo lightcones with HOD galaxies
Related: Hod,
cats = Catalogues()
Operation | Result |
---|---|
cats.generate(Hod, LightCones, z_min, z_max) | mock catalogues |
len(cats) | number of catalogues |
cats[i] | ith catalogue |
In [5]:
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
import mockgallib as mock
mock.cosmology.set(0.31) # set omega_m
hod = mock.Hod()
hod.set_coef([12.0, 0.5, 0, 0, 1.0, 0.0, 13.0, 0.0, 1.5, 0.0])
print(hod)
lightcones = mock.LightCones()
lightcones.load_h5(['../data/halo_lightcone_mini.h5'])
cats = mock.Catalogues()
cats.generate_galaxies(hod, lightcones, 0.4, 1.2)
cats[0].shape
Out[5]:
Each catalogue cats[i] is an np-array with 8 columns
In [6]:
cat = cats[0]
plt.figure(figsize = [8,2])
plt.xlabel('$x$')
plt.ylabel('$y$')
plt.plot(cat[:,0], cat[:,1], 'r.');
In [1]:
%%html
<style>table {float:left}</style>