hmf.helpers.sample.sample_mf¶
- hmf.helpers.sample.sample_mf(N, log_mmin, sort=False, rng=None, **mf_kwargs)[source]¶
Create a sample of halo masses from a theoretical mass function.
- Parameters:
- Returns:
m (array_like) – The masses
hmf (hmf.MassFunction instance) – The instance used to define the mass function.
Examples
Simplest example:
>>> m,hmf = sample_mf(1e5,11.0)
Or change the mass function:
>>> m,hmf = sample_mf(1e6,10.0,hmf_model="PS",Mmax=17)