SciPy

Peaks in Gaussian random fields

This module contains functions related to peaks in Gaussian random fields, namely the overdensity for collapse, peak height and curvature, and the non-linear mass.

Basics

The peak height of a halo quantifies how big a fluctuation in the linear density field this halo corresponds to. This quantity is computed as the ratio of the critical overdensity of collapse (1.686 according to the top-hat spherical collapse model in an Einstein-de Sitter universe) to the variance of the linear density field on the scale of the halo, \(\nu \equiv \delta_c / \sigma(M)\). For example, halos with peak height one correspond to peaks that have just reached a variance equal to the collapse overdensity at a given redshift, and should thus be collapsing. Halos of smaller peak height have, on average, already collapsed in the past, and halos of higher peak height will, on average, collapse in the future. The peak height of a halo is easy to evaluate in Colossus using the peakHeight() function:

from colossus.cosmology import cosmology
from colossus.lss import peaks

cosmology.setCosmology('planck15')
nu = peaks.peakHeight(M, z)

The inverse function massFromPeakHeight() converts peak height to mass. Internally, the scale on which the variance is computed as the lagrangian radius lagrangianR() of halos, and the collapseOverdensity() function offers additional options such as corrections due to cosmology. Finally, the variance is computed using the sigma() function which takes another set of parameters. All those options can be passed to any function related to peak height. The nonLinearMass() is defined as the mass where peak height is unity at a given redshift, i.e., the mass of a halo that is typically collapsing at the current time. Finally, peakCurvature() is a higher-order property of peaks that describes their shape. Please see the Tutorials for more extensive code examples.

Module contents

lagrangianR(M)

The lagrangian radius of a halo of mass M.

lagrangianM(R)

The lagrangian mass of a halo of radius R.

collapseOverdensity([corrections, z])

The linear overdensity threshold for halo collapse.

peakHeight(M, z[, ps_args, sigma_args, ...])

The peak height corresponding to a given a halo mass.

massFromPeakHeight(nu, z[, ps_args, ...])

Halo mass from peak height.

nonLinearMass(z[, ps_args, sigma_args, ...])

The non-linear mass.

peakCurvature(M, z[, exact, ps_args, ...])

The average curvature of peaks for a halo mass M.

powerSpectrumSlope(nu, z[, slope_type, ...])

The slope of the linear matter power spectrum for halos of a given peak height.

Module reference

lss.peaks.lagrangianR(M)

The lagrangian radius of a halo of mass M.

Converts the mass of a halo (in \(M_{\odot} / h\)) to the radius of its comoving Lagrangian volume (in comoving Mpc/h), that is the volume that would enclose the halo’s mass at the mean density of the universe at z = 0.

Parameters
M: array_like

Halo mass in \(M_{\odot} / h\); can be a number or a numpy array.

Returns
R: array_like

The lagrangian radius in comoving Mpc/h; has the same dimensions as M.

See also

lagrangianM

The lagrangian mass of a halo of radius R.

lss.peaks.lagrangianM(R)

The lagrangian mass of a halo of radius R.

Converts the radius of a halo (in comoving Mpc/h) to the mass in its comoving Lagrangian volume (in \(M_{\odot} / h\)), that is the volume that would enclose the halo’s mass at the mean density of the universe at z = 0.

Parameters
R: array_like

Halo radius in comoving Mpc/h; can be a number or a numpy array.

Returns
M: array_like

The lagrangian mass; has the same dimensions as R.

See also

lagrangianR

The lagrangian radius of a halo of mass M.

lss.peaks.collapseOverdensity(corrections=False, z=None)

The linear overdensity threshold for halo collapse.

The linear overdensity threshold for halo collapse according to the spherical top-hat collapse model (Gunn & Gott 1972). In an EdS universe, this number is \(3/5 (3\pi/2)^{2/3}=1.686\).

This value is modified very slightly in a non-EdS universe (by less than 3% for any realistic cosmology). Such corrections are applied if desired, by default this function returns the constant value (see, e.g., Mo, van den Bosch & White for a derivation of the corrections). Note that correction formulae are implemented for flat cosmologies and cosmologies without dark energy, but not for the general case (both curvature and dark energy). The correction is essentially identical in effect to the Equation A6 of Kitayama & Suto 1996.

Parameters
corrections: bool

If True, corrections to the collapse overdensity are applied in a non-EdS cosmology. In this case, a redshift must be passed.

z: float

Redshift where the collapse density is evaluated. Only necessary if corrections == True.

Returns
delta_c: float

The threshold overdensity for collapse.

lss.peaks.peakHeight(M, z, ps_args={'model': 'eisenstein98', 'path': None}, sigma_args={}, deltac_args={})

The peak height corresponding to a given a halo mass.

Peak height is defined as \(\nu \equiv \delta_c / \sigma(M)\). This function takes optional parameter lists for the matterPowerSpectrum(), sigma(), and collapseOverdensity() functions. Please see the documentation of those funtions for details.

Note that the peak height does not explicitly depend on the mass definition in which M is given, but that it corresponds to that mass definition. For example, if M200m is given, that mass and the corresponding peak height will be larger than R500c for the same halo.

Parameters
M: array_like

Halo mass in \(M_{\odot}/h\); can be a number or a numpy array.

z: float

Redshift.

ps_args: dict

Arguments passed to the matterPowerSpectrum() function.

sigma_args: dict

Arguments passed to the sigma() function.

deltac_args: dict

Arguments passed to the collapseOverdensity() function.

Returns
nu: array_like

Peak height; has the same dimensions as M.

See also

massFromPeakHeight

Halo mass from peak height.

lss.peaks.massFromPeakHeight(nu, z, ps_args={'model': 'eisenstein98', 'path': None}, sigma_args={}, deltac_args={})

Halo mass from peak height.

Peak height is defined as \(\nu \equiv \delta_c / \sigma(M)\). This function takes optional parameter lists for the matterPowerSpectrum(), sigma(), and collapseOverdensity() functions. Please see the documentation of those funtions for details.

Parameters
nu: array_like

Peak height; can be a number or a numpy array.

z: float

Redshift.

ps_args: dict

Arguments passed to the matterPowerSpectrum() function.

sigma_args: dict

Arguments passed to the sigma() function.

deltac_args: dict

Arguments passed to the collapseOverdensity() function.

Returns
M: array_like

Mass in \(M_{\odot}/h\); has the same dimensions as nu.

See also

peakHeight

The peak height corresponding to a given a halo mass.

lss.peaks.nonLinearMass(z, ps_args={'model': 'eisenstein98', 'path': None}, sigma_args={}, deltac_args={})

The non-linear mass.

\(M^*\) is the mass for which the variance is equal to the collapse threshold, i.e. \(\sigma(M^*) = \delta_c\) and thus \(\nu(M^*) = 1\).

This function takes optional parameter lists for the matterPowerSpectrum(), sigma(), and collapseOverdensity() functions. Please see the documentation of those funtions for details.

Parameters
z: float

Redshift.

ps_args: dict

Arguments passed to the matterPowerSpectrum() function.

sigma_args: dict

Arguments passed to the sigma() function.

deltac_args: dict

Arguments passed to the collapseOverdensity() function.

Returns
Mstar: float

The non-linear mass in \(M_{\odot}/h\).

See also

peakHeight

The peak height corresponding to a given a halo mass.

massFromPeakHeight

Halo mass from peak height.

lss.peaks.peakCurvature(M, z, exact=False, ps_args={'model': 'eisenstein98', 'path': None}, sigma_args={'filt': 'gaussian'}, deltac_args={})

The average curvature of peaks for a halo mass M.

In a Gaussian random field, \(\delta\), the peak height is defined as \(\delta / \sigma\) where \(\sigma = \sigma_0\) is the rms variance. The curvature of the field is defined as \(x = -\nabla^2 \delta / \sigma_2\) where \(\sigma_2\) is the second moment of the variance (see the documentation of the sigma() function).

This function computes the average curvature of peaks in a Gaussian random field, <x>, according to Bardeen et al. 1986 (BBKS), for halos of a certain mass M. This mass is converted to a lagrangian scale R which serves as the scale on which the variance and its moments are evaluated. The computation can be performed by integration of Equation A14 in BBKS (if exact == True), or using their fitting function in Equation 6.13 (if exact == False). The fitting function is excellent over the relevant range of peak heights.

Parameters
M: array_like

Mass in in \(M_{\odot}/h\); can be a number or a numpy array.

z: float

Redshift.

exact: bool

If True, evaluate the integral exactly; if False, use the BBKS approximation.

ps_args: dict

Arguments passed to the matterPowerSpectrum() function.

sigma_args: dict

Arguments passed to the sigma() function.

deltac_args: dict

Arguments passed to the collapseOverdensity() function.

Returns
nu: array_like

Peak height; has the same dimensions as M.

gamma: array_like

An intermediate parameter, \(\gamma = \sigma_1^2 / (\sigma_0 \sigma_2)\) (see Equation 4.6a in BBKS); has the same dimensions as M.

x: array_like

The mean peak curvature for halos of mass M (note the caveat discussed above); has the same dimensions as M.

theta: array_like

An intermediate parameter (see Equation 6.14 in BBKS; only returned if exact == False); has the same dimensions as M.

nu_tilde: array_like

The modified peak height (see Equation 6.15 in BBKS; only returned if exact == False); has the same dimensions as M.

Warning

While peak height quantifies how high a fluctuation over the background a halo corresponds to, peak curvature tells us about the shape of the initial peak. However, peak curvature suffers from the cloud-in-cloud problem (BBKS): not all peaks end up forming halos, especially small peaks will often get swallowed by larger peaks. Thus, the average peak curvature is not necessarily equal to the average curvature of peaks that form halos.

lss.peaks.powerSpectrumSlope(nu, z, slope_type='P', scale=1.0, ps_args={'model': 'eisenstein98', 'path': None}, sigma_args={})

The slope of the linear matter power spectrum for halos of a given peak height.

In a Gaussian random field, the abundance and shape of the peaks are determined only by the power spectrum. The slope of this power spectrum evolves with scale in realistic cosmologies, meaning that peaks of different peak height form in a field with a locally different slope which can affect their shape, the abundance of sub-structure and so on.

This function calculates an effective slope \(n_{\rm eff}\) using a number of possible methods, namely the slope of the power spectrum (slope_type = 'P'),

\[n_{\rm eff} = \left. \frac{d \ln(P)}{d \ln(k)} \right \vert_{k = f 2 \pi / R_{\rm L}}\]

or the slope of the variance (slope_type = 'sigma'),

\[n_{\rm eff} = -2 \left. \frac{d \ln \sigma(R)}{d \ln R} \right \vert_{R = f R_{\rm L}} - 3\]

where \(f\) is the scale parameter given by the user and \(R_{\rm L}\) is the Lagrangian radius corresponding to the given peak height and redshift. Interpolation must be activated in the cosmology as this function uses derivatives.

Parameters
nu: array_like

Peak height; can be a number or a numpy array.

z: float

Redshift.

slope_type: str

The type of slope function, can be P or sigma (see above).

scale: float

Scales where the slope is evaluated, see above.

ps_args: dict

Arguments passed to the matterPowerSpectrum() function.

sigma_args: dict

Arguments passed to the sigma() function.

Returns
n_eff: array_like

Effective slope of the power spectrum; has the same dimensions as nu.