Zheng07Cens¶
- class halotools.empirical_models.Zheng07Cens(threshold=-20, prim_haloprop_key='halo_mvir', **kwargs)[source]¶
Bases:
OccupationComponent
Erf
function model for the occupation statistics of central galaxies, introduced in Zheng et al. 2005, arXiv:0408564. This implementation uses Zheng et al. 2007, arXiv:0703457, to assign fiducial parameter values.Note
The
Zheng07Cens
model is part of thezheng07
prebuilt composite HOD-style model. For a tutorial on thezheng07
composite model, see Zheng et al. (2007) Composite Model.- Parameters:
- thresholdfloat, optional
Luminosity threshold of the mock galaxy sample. If specified, input value must agree with one of the thresholds used in Zheng07 to fit HODs: [-18, -18.5, -19, -19.5, -20, -20.5, -21, -21.5, -22]. Default value is specified in the
model_defaults
module.- prim_haloprop_keystring, optional
String giving the column name of the primary halo property governing the occupation statistics of gal_type galaxies. Default value is specified in the
model_defaults
module.
Examples
>>> cen_model = Zheng07Cens() >>> cen_model = Zheng07Cens(threshold=-19.5) >>> cen_model = Zheng07Cens(prim_haloprop_key='halo_m200b')
Methods Summary
get_published_parameters
(threshold[, ...])Best-fit HOD parameters from Table 1 of Zheng et al. 2007.
mean_occupation
(**kwargs)Expected number of central galaxies in a halo of mass halo_mass.
Methods Documentation
- get_published_parameters(threshold, publication='Zheng07')[source]¶
Best-fit HOD parameters from Table 1 of Zheng et al. 2007.
- Parameters:
- thresholdfloat
Luminosity threshold defining the SDSS sample to which Zheng et al. fit their HOD model. If the
publication
keyword argument is set toZheng07
, thenthreshold
must be agree with one of the published values: [-18, -18.5, -19, -19.5, -20, -20.5, -21, -21.5, -22].- publicationstring, optional
String specifying the publication that will be used to set the values of
param_dict
. Default is Zheng et al. (2007).
- Returns:
- param_dictdict
Dictionary of model parameters whose values have been set to agree with the values taken from Table 1 of Zheng et al. 2007.
Examples
>>> cen_model = Zheng07Cens() >>> cen_model.param_dict = cen_model.get_published_parameters(cen_model.threshold)
- mean_occupation(**kwargs)[source]¶
Expected number of central galaxies in a halo of mass halo_mass. See Equation 2 of arXiv:0703457.
- Parameters:
- prim_haloproparray, optional
Array of mass-like variable upon which occupation statistics are based. If
prim_haloprop
is not passed, thentable
keyword argument must be passed.- tableobject, optional
Data table storing halo catalog. If
table
is not passed, thenprim_haloprop
keyword argument must be passed.
- Returns:
- mean_ncenarray
Mean number of central galaxies in the input table.
Notes
The
mean_occupation
method computes the following function:\(\langle N_{\mathrm{cen}} \rangle_{M} = \frac{1}{2}\left( 1 + \mathrm{erf}\left( \frac{\log_{10}M - \log_{10}M_{min}}{\sigma_{\log_{10}M}} \right) \right)\)
Examples
>>> cen_model = Zheng07Cens()
The
mean_occupation
method of all OccupationComponent instances supports two different options for arguments. The first option is to directly pass the array of the primary halo property:>>> testmass = np.logspace(10, 15, num=50) >>> mean_ncen = cen_model.mean_occupation(prim_haloprop = testmass)
The second option is to pass
mean_occupation
a full halo catalog. In this case, the array storing the primary halo property will be selected by accessing thecen_model.prim_haloprop_key
column of the input halo catalog. For illustration purposes, we’ll use a fake halo catalog rather than a (much larger) full one:>>> from halotools.sim_manager import FakeSim >>> fake_sim = FakeSim() >>> mean_ncen = cen_model.mean_occupation(table=fake_sim.halo_table)