skypy.halos.quenching.mass_quenched

skypy.halos.quenching.mass_quenched(halo_mass, offset, width)[source] [edit on github]

Mass quenching function. This function implements the model proposed by A.Amara where the probability of a halo being quenched is related to the error function of the logarithm of the halo’s mass standardised by an offset and width parameter. The model is inspired on [1] and [2].

Parameters:
halo_mass: (nh,) array_like

Array of halo masses in units of solar mass, Msun.

offset: float

Halo mass in Msun at which quenching probability is 50%.

width: float

Width of the error function.

Returns:
quenched: (nh,) array_like, boolean

Boolean array indicating which halo’s host galaxies are mass-quenched.

References

[1]

Peng et al. 2010, doi 10.1088/0004-637X/721/1/193.

[2]

Birrer et al. 2014, arXiv 1401.3162.

Examples

This example shows how many halos are mass quenched (True) and how many survive (False) from a list of 1000 halos:

>>> import numpy as np
>>> from astropy import units
>>> from skypy.halos.quenching import mass_quenched
>>> from collections import Counter
>>> offset, width = 1.0e12, 0.5
>>> halo_mass = np.random.lognormal(mean=np.log(offset), sigma=width,
...                                 size=1000)
>>> quenched = mass_quenched(halo_mass, offset, width)
>>> Counter(quenched)
Counter({...})