skypy.halos.mass.number_subhalos

skypy.halos.mass.number_subhalos(halo_mass, alpha, beta, gamma_M, x, m_min, noise=True)[source] [edit on github]

Number of subhalos. This function calculates the number of subhalos above a given initial mass for a parent halo of given mass according to the model of Vale & Ostriker 2004 [1] equation (7). The number of subhalos returned can optionally be sampled from a Poisson distribution with that mean.

Parameters:
halo_mass(nm, ) array_like

The mass of the halo parent, in units of solar mass.

alpha, betafloat

Parameters that determines the subhalo Schechter function. Its the amplitude is defined by equation (2) in [1].

gamma_Mfloat

Present day mass fraction in subhalos.

xfloat

Parameter that accounts for the added mass of the original, unstripped subhalos.

m_minarray_like

Original mass of the least massive subhalo, in units of solar mass. Current stripped mass is given by \(x m_{min}\).

noisebool, optional

Poisson-sample the number of subhalos. Default is True.

Returns:
nsubhalos: array_like

Array of the number of subhalos assigned to parent halos with mass halo_mass.

References

[1]

Vale, A. and Ostriker, J.P. (2005), arXiv: astro-ph/0402500.

Examples

>>> import numpy as np
>>> from skypy.halos import mass

This gives the number of subhalos in a parent halo of mass \(10^{12} M_\odot\)

>>> halo, min_sh = 1.0e12, 1.0e6
>>> alpha, beta, gamma_M = 1.9, 1.0, 0.3
>>> x = 3
>>> nsh = mass.number_subhalos(halo, alpha, beta, gamma_M, x, min_sh)