halomod.concentration¶
Module defining oncentration-mass relations.
This module defines a base CMRelation
component class, and a number of specific
concentration-mass relations. In addition, it defines a factory function make_colossus_cm()
which helps with integration with the colossus
cosmology code. With this function,
the user is able to easily create a halomod
-compatible Component
model that
transparently uses colossus
the background to do the actual computation of the
concentration mass relation. This means it is easy to use any of the updated models
from colossus
in a native way.
Examples
A simple example of using a native concentration-mass relation:
>>> from halomod.concentration import Duffy08
>>> duffy = Duffy08()
>>> m = np.logspace(10, 15, 100)
>>> plt.plot(m, duffy.cm(m, z=0))
You can also specify a different concentration-mass relation for tracer
if you’re working with TracerHaloModel
:
>>> from halomod import HaloModel
>>> hm = HaloModel(halo_concentration_model='Ludlow16',
>>> tracer_concentration_model='Duffy08')
Constructing and using a colossus-based relation:
>>> from halomod.concentration import make_colossus_cm
>>> diemer = make_colossus_cm(model='diemer15', statistic='median')()
>>> plt.plot(m, diemer.cm(m, z=1))
Note the extra function call on the second line here – make_colossus_cm()
returns
a class, not an instance. Under the hood, any parameters passed to the function other
than model
are set as “defaults”, and can be modified like standard model params.
For instance, using such a model in a broader HaloModel
framework:
>>> diemer19_cls = make_colossus_cm(model='diemer19', ps_args={})
>>> hm = HaloModel(
>>> halo_concentration_model=diemer19_cls,
>>> halo_concentration_params={'ps_args': {'model': 'eisenstein98'}}
>>> )
>>> hm.update(halo_concentration_params = {"ps_args": {"model": 'sugiyama95'}})
Note that while statistic
is a valid argument to the diemer19 model in COLOSSUS,
we have constructed it without access to that argument (and so it recieves its default
value of “median”). This means we cannot update it via the HaloModel
interface.
Functions
|
A factory function which helps with integration with the |
Classes
|
Concentration-Mass relation of Bullock et al.(2001) [Ra15dcd2e9366-1]. |
|
Extended Concentration-Mass relation of Bullock et al.(2001) [Reac12ec1358f-1]. |
|
Base-class for Concentration-Mass relations. |
|
Concentration-mass relation from Duffy et al.(2008) [Rd9f290679c22-1]. |
|
Analytical Concentration-Mass relation of Ludlow et al.(2016) [Ra1651637c9c6-1]. |
|
Empirical Concentration-Mass relation of Ludlow et al.(2016) [R31efbdecf32d-1] for Planck-like cosmology. |
|
This class is deprecated -- use |
|
This class is deprecated -- use |
|
Concentration-Mass relation based on Maccio et al.(2007) [R2b3cefcc007e-1]. |
|
Concentration-mass relation from Duffy et al.(2008) [R557f5e2af887-1]. |