BinaryGalpropInterpolModel

class halotools.empirical_models.BinaryGalpropInterpolModel(galprop_abscissa, galprop_ordinates, logparam=True, interpol_method='spline', **kwargs)[source] [edit on github]

Bases: halotools.empirical_models.BinaryGalpropModel

Component model for any binary-valued galaxy property whose assignment is determined by interpolating between points on a grid.

One example of a model of this class could be used to help build is Tinker et al. (2013), arXiv:1308.2974. In this model, a galaxy is either active or quiescent, and the quiescent fraction is purely a function of halo mass, with separate parameters for centrals and satellites. The value of the quiescent fraction is computed by interpolating between a grid of values of mass. BinaryGalpropInterpolModel is quite flexible, and can be used as a template for any binary-valued galaxy property whatsoever. See the examples below for usage instructions.

Parameters:

galprop_name : array, keyword argument

String giving the name of galaxy property being assigned a binary value.

gal_type : string, optional

Name of the galaxy population. Default is None, in which case the model instance will not have the gal_type attribute.

prim_haloprop_key : string, optional

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

galprop_abscissa : array, optional

Values of the primary halo property at which the galprop fraction is specified.

galprop_ordinates : array, optional

Values of the galprop fraction when evaluated at the input abscissa.

logparam : bool, optional

If set to True, the interpolation will be done in the base-10 logarithm of the primary halo property, rather than linearly. Default is True.

interpol_method : string, optional

Keyword specifying how mean_galprop_fraction evaluates input values of the primary halo property. The default spline option interpolates the model’s abscissa and ordinates. The polynomial option uses the unique, degree N polynomial passing through the ordinates, where N is the number of supplied ordinates.

input_spline_degree : int, optional

Degree of the spline interpolation for the case of interpol_method=’spline’. If there are k abscissa values specifying the model, input_spline_degree is ensured to never exceed k-1, nor exceed 5. Default is 3.

Examples

Suppose we wish to construct a model for whether a central galaxy is star-forming or quiescent. We want to set the quiescent fraction to 1/3 for Milky Way-type centrals (\(M_{\mathrm{vir}}=10^{12}M_{\odot}\)), and 90% for massive cluster centrals (\(M_{\mathrm{vir}}=10^{15}M_{\odot}\)). We can use the BinaryGalpropInterpolModel to implement this as follows:

>>> abscissa, ordinates = [12, 15], [1/3., 0.9]
>>> cen_quiescent_model = BinaryGalpropInterpolModel(galprop_name='quiescent', galprop_abscissa=abscissa, galprop_ordinates=ordinates, prim_haloprop_key='mvir')

The cen_quiescent_model has a built-in method that computes the quiescent fraction as a function of mass:

>>> quiescent_frac = cen_quiescent_model.mean_quiescent_fraction(prim_haloprop =1e12)

There is also a built-in method to return a Monte Carlo realization of quiescent/star-forming galaxies:

>>> masses = np.logspace(10, 15, num=100)
>>> quiescent_realization = cen_quiescent_model.mc_quiescent(prim_haloprop = masses)

Now quiescent_realization is a boolean-valued array of the same length as masses. Entries of quiescent_realization that are True correspond to central galaxies that are quiescent.

Here is another example of how you could use BinaryGalpropInterpolModel to construct a simple model for satellite morphology, where the early- vs. late-type of the satellite depends on \(V_{\mathrm{peak}}\) value of the host halo

>>> sat_morphology_model = BinaryGalpropInterpolModel(galprop_name='late_type', galprop_abscissa=abscissa, galprop_ordinates=ordinates, prim_haloprop_key='vpeak_host')
>>> vmax_array = np.logspace(2, 3, num=100)
>>> morphology_realization = sat_morphology_model.mc_late_type(prim_haloprop =vmax_array)
_mean_galprop_fraction(**kwargs)[source] [edit on github]

Expectation value of the galprop for galaxies living in the input halos.

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:

mean_galprop_fraction : array_like

Values of the galprop fraction evaluated at the input primary halo properties.