halomod.profiles.Profile

class halomod.profiles.Profile(cm_relation, mdef=<hmf.halos.mass_definitions.SOMean object>, z=0.0, cosmo=FlatLambdaCDM(name="Planck15", H0=67.7 km / (Mpc s), Om0=0.307, Tcmb0=2.725 K, Neff=3.05, m_nu=[0.   0.   0.06] eV, Ob0=0.0486), **model_parameters)[source]

Halo radial density profiles.

This class provides basic building blocks for all kinds of fun with halo radial density profiles. It is modeled on the system described in arXiv:2009.14066. This means that subclasses providing specific profiles shapes, f(x) must provide very minimal other information for a range of products to be available.

The “main” quantities available are the halo_profile itself, its fourier pair, and its convolution (this is not available for every halo_profile). Furthermore, quantities such as the halo_concentration-mass relation are provided, along with tools such as those to generate a mock halo of the given halo_profile.

Parameters
  • cm_relation (CMRelation instance) – Identifies which halo-concentration-mass relation to use.

  • mdef (hmf.halos.mass_definitions.MassDefinition instance) – A mass definition to interpret input masses with.

  • z (float, default 0.0) – The redshift of the halo

Methods

__init__(cm_relation[, mdef, z, cosmo, Om0, …])

Initialize self.

cdf(r[, c, m, coord])

The cumulative distribution function, \(m(<x)/m_v\)

cm_relation(m)

The halo_concentration-mass relation

get_models()

Get a dictionary of all implemented models for this component.

halo_mass_to_radius(m[, at_z])

Return the halo radius corresponding to m.

halo_radius_to_mass(r[, at_z])

Return the halo mass corresponding to r.

lam(r, m[, norm, c, coord])

The density halo_profile convolved with itself.

populate(n, m[, c, centre])

Populate a halo with the current halo profile of mass m with n tracers.

rho(r, m[, norm, c, coord])

The density at radius r of a halo of mass m.

scale_radius(m[, at_z])

Return the scale radius for a halo of mass m.

u(k, m[, norm, c, coord])

The (optionally normalised) Fourier-transform of the density halo_profile

virial_velocity([m, r])

Return the virial velocity for a halo of mass m.