LogNormalScatterModel

class halotools.empirical_models.LogNormalScatterModel(prim_haloprop_key='halo_mpeak', **kwargs)[source] [edit on github]

Bases: object

Simple model used to generate log-normal scatter in a stellar-to-halo-mass type relation.

Parameters:

prim_haloprop_key : string, optional

String giving the column name of the primary halo property governing the level of scatter. Default is set in the model_defaults module.

scatter_abscissa : array_like, optional

Array of values giving the abscissa at which the level of scatter will be specified by the input ordinates. Default behavior will result in constant scatter at a level set in the model_defaults module.

scatter_ordinates : array_like, optional

Array of values defining the level of scatter at the input abscissa. Default behavior will result in constant scatter at a level set in the model_defaults module.

Examples

>>> scatter_model = LogNormalScatterModel()
>>> scatter_model = LogNormalScatterModel(prim_haloprop_key='halo_mvir')

To implement variable scatter, we need to define the level of log-normal scatter at a set of control values of the primary halo property. Here we give an example of a model in which the scatter is 0.3 dex for Milky Way table and 0.1 dex in cluster table:

>>> scatter_abscissa = [12, 15]
>>> scatter_ordinates = [0.3, 0.1]
>>> scatter_model = LogNormalScatterModel(scatter_abscissa=scatter_abscissa, scatter_ordinates=scatter_ordinates)

Methods Summary

mean_scatter(**kwargs) Return the amount of log-normal scatter that should be added to the galaxy property as a function of the input table.
scatter_realization([seed]) Return the amount of log-normal scatter that should be added to the galaxy property as a function of the input table.

Methods Documentation

mean_scatter(**kwargs)[source] [edit on github]

Return the amount of log-normal scatter that should be added to the galaxy property as a function of the input table.

Parameters:

prim_haloprop : array, optional

Array of mass-like variable upon which occupation statistics are based. If prim_haloprop is not passed, then table keyword argument must be passed.

table : object, optional

Data table storing halo catalog. If table is not passed, then prim_haloprop keyword argument must be passed.

Returns:

scatter : array_like

Array containing the amount of log-normal scatter evaluated at the input table.

scatter_realization(seed=None, **kwargs)[source] [edit on github]

Return the amount of log-normal scatter that should be added to the galaxy property as a function of the input table.

Parameters:

prim_haloprop : array, optional

Array of mass-like variable upon which occupation statistics are based. If prim_haloprop is not passed, then table keyword argument must be passed.

table : object, optional

Data table storing halo catalog. If table is not passed, then prim_haloprop keyword argument must be passed.

seed : int, optional

Random number seed. Default is None.

Returns:

scatter : array_like

Array containing a random variable realization that should be summed with the galaxy property to add scatter.