Mass conversions and pseudo-evolution

This module implements functions to convert between spherical overdensity mass definitions and to compute pseudo-evolution. For basic aspects of spherical overdensity mass definitions, see the Spherical overdensity masses section.

Basics

The functions in this unit assume a static halo density profile and compute spherical overdensity radius and mass definitions based on this profile. These functions include changing the overdensity definition at fixed redshift, changing redshift at fixed overdensity (“pseudo-evolution”), or changing both.

One common application is to convert one spherical overdensity mass definition to another (at fixed redshift):

from colossus.halo import mass_defs

Mvir = 1E12
cvir = 10.0
z = 1.0
M200m, R200m, c200m = mass_defs.changeMassDefinition(Mvir, cvir, z, 'vir', '200m')

Here we assumed a halo with \(M_{vir}=10^{12} M_{\odot}/h\) and \(c_{vir} = 10\) at z=1, and converted it to the 200m mass definition. For convenience, the new radius and concentration are also returned.

Pseudo-evolution is the evolution of a spherical overdensity halo radius, mass, and concentration due to an evolving reference density (see Diemer et al. 2013 for more information). The pseudoEvolve() function is a general implementation of this effect. The function assumes a profile that is fixed in physical units, and computes how the radius, mass and concentration evolve due to changes in redshift (at fixed mass definition). In the following example we compute the pseudo-evolution of a halo with virial mass \(M_{vir}=10^{12} M_{\odot}/h\) from z=1 to z=0:

M_ini = 1E12
c_ini = 10.0
z_ini = 1.0
z_final = 0.0
M, R, c = mass_defs.pseudoEvolve(M_ini, c_ini, 'vir', z_ini, z_final)

Here we have assumed that the halo has a concentration \(c_{vir} = 10\) at z=1. By default, an NFW density profile is assumed, but the user can also pass another profile object.

Often, we do not know the concentration of a halo and wish to estimate it using a concentration- mass model. This can be done using the Concentration module, but there is also a convenient wrapper for the changeMassDefinition() function, changeMassDefinitionCModel(). This function is located in a different module to avoid circular imports. Please see the Tutorials for more extensive code examples.

Module contents

evolveSO(M_i, c_i, z_i, mdef_i, z_f, mdef_f) Evolve the spherical overdensity radius for a fixed density profile.
changeMassDefinition(M, c, z, mdef_in, mdef_out) Change the spherical overdensity mass definition assuming a fixed density profile.
pseudoEvolve(M, c, mdef, z_i, z_f[, …]) Pseudo-evolve a static density profile.

Module reference

halo.mass_defs.evolveSO(M_i, c_i, z_i, mdef_i, z_f, mdef_f, profile='nfw', profile_args={})

Evolve the spherical overdensity radius for a fixed density profile.

This function computes the evolution of spherical overdensity mass and radius due to a changing reference density, redshift, or both. The user passes the mass and concentration of the density profile, together with a redshift and mass definition to which M and c refer.

To evaluate the new mass, radius, and concentration, we need to assume a particular form of the density profile. This profile can be either the NFW profile (profile = 'nfw'), or any other profile class (derived from HaloDensityProfile). In the latter case, the passed profile class must accept mass, mass definition, concentration, and redshift as parameters to its constructor. Additional parameters can be passed as well, for example outer profile terms.

Parameters:
M_i: array_like

The initial halo mass in \(M_{\odot}/h\); can be a number or a numpy array. If both M_i and c_i are arrays, they must have the same dimensions.

c_i: array_like

The initial halo concentration; can be a number of a numpy array. If both M_i and c_i are arrays, they must have the same dimensions.

z_i: float

The initial redshift.

mdef_i: str

The initial mass definition.

z_f: float

The final redshift (can be smaller, equal to, or larger than z_i).

mdef_f: str

The final mass definition (can be the same as mdef_i, or different).

profile: str or HaloDensityProfile

The functional form of the profile assumed in the computation; can be nfw or an instance of HaloDensityProfile (which satisfies particular conditions, see above).

profile_args: dict

Any other keyword args are passed to the constructor of the density profile class.

Returns:
Mnew: array_like

The new halo mass in \(M_{\odot}/h\); has the same dimensions as M_i or c_i.

Rnew: array_like

The new halo radius in physical kpc/h; has the same dimensions as M_i or c_i.

cnew: array_like

The new concentration (now referring to the new mass definition); has the same dimensions as M_i or c_i.

See also

changeMassDefinition
Change the spherical overdensity mass definition.
pseudoEvolve
Pseudo-evolve a static density profile.
halo.mass_defs.changeMassDefinition(M, c, z, mdef_in, mdef_out, profile='nfw', profile_args={})

Change the spherical overdensity mass definition assuming a fixed density profile.

This function is a special case of the more general evolveSO() function. We assume a density profile fixed in physical coordinates and at a fixed redshift, but we change the mass definition. This leads to a different spherical overdensity radius, mass, and concentration. By default, the density profile is assumed to be an NFW profile, but other profiles can be specified.

Parameters:
M: array_like

The initial halo mass in \(M_{\odot}/h\); can be a number or a numpy array. If both M and c are arrays, they must have the same dimensions.

c: array_like

The initial halo concentration; can be a number of a numpy array. If both M and c are arrays, they must have the same dimensions.

z: float

The initial redshift.

mdef_in: str

The input mass definition.

mdef_out: str

The output mass definition.

profile: str

The functional form of the profile assumed in the computation; can be nfw or dk14.

profile_args: dict

Any other keyword args are passed to the constructor of the density profile class.

Returns:
Mnew: array_like

The new halo mass in \(M_{\odot}/h\); has the same dimensions as M or c.

Rnew: array_like

The new halo radius in physical kpc/h; has the same dimensions as M or c.

cnew: array_like

The new concentration (now referring to the new mass definition); has the same dimensions as M or c.

See also

evolveSO
Evolve the spherical overdensity radius for a fixed profile.
halo.mass_adv.changeMassDefinitionCModel
Change the spherical overdensity mass definition, using a model for the concentration.
halo.mass_defs.pseudoEvolve(M, c, mdef, z_i, z_f, profile='nfw', profile_args={})

Pseudo-evolve a static density profile.

This function computes the evolution of spherical overdensity mass and radius due to a changing reference density, an effect called ‘pseudo-evolution’ (e.g., Diemer et al. 2013). The user passes the mass and concentration of the density profile, together with a redshift and mass definition to which M and c refer.

To evaluate the new mass, radius, and concentration, we need to assume a particular form of the density profile. This profile can be either the NFW profile (profile = 'nfw'), or any other profile class (derived from HaloDensityProfile). In the latter case, the passed profile class must accept mass, mass definition, concentration, and redshift as parameters to its constructor. Additional parameters can be passed as well, for example outer profile terms.

Parameters:
M: array_like

The initial halo mass in \(M_{\odot}/h\); can be a number or a numpy array. If both M and c are arrays, they must have the same dimensions.

c: array_like

The initial halo concentration; can be a number of a numpy array. If both M and c are arrays, they must have the same dimensions.

mdef: str

The SO mass definition. See Halo Mass Definitions for details.

z_i: float

The initial redshift.

z_f: float

The final redshift (can be smaller, equal to, or larger than z_i).

profile: str

The functional form of the profile assumed in the computation; can be nfw or dk14.

profile_args: dict

Any other keyword args are passed to the constructor of the density profile class.

Returns:
Mnew: array_like

The new halo mass in \(M_{\odot}/h\); has the same dimensions as M or c.

Rnew: array_like

The new halo radius in physical kpc/h; has the same dimensions as M or c.

cnew: array_like

The new concentration (now referring to the new mass definition); has the same dimensions as M or c.

See also

evolveSO
Evolve the spherical overdensity radius for a fixed profile.