pynbody.analysis.hmf

pynbody.analysis.hmf#

Routines related to halo mass function and other cosmological calculations.

Warning

These routines were implemented in 2012 when there were no other python libraries that could do this. Since then, cosmology-focussed libraries such as hmf, Colossus and CCL have been developed. For precision cosmology applications, we recommend using these libraries, since the routines here have not been tested for precision applications (and are known to use approximations).

Functions

correlation(r[, powspec])

Calculate the correlation function of the density field at a specified radius.

correlation_func(context[, log_r_min, ...])

Calculate the linear density field correlation function.

get_neffm(mass, sigma)

Calculate the effective spectral index of the power spectrum at a given mass scale.

halo_bias(context, M[, kern, pspec, delta_crit])

Return the halo bias for the given halo mass.

halo_mass_function(context[, log_M_min, ...])

Returns the halo mass function, dN/d log_{10} M in units of Mpc^-3 h^3.

simulation_halo_mass_function(snapshot_or_cat)

Estimate a halo mass function from a simulation, via binning haloes in mass.

variance(M_or_R[, f_filter, powspec, arg_is_R])

Calculate the variance of the density field smoothed on a mass scale M, or optionally a length scale R.

Classes

BiasedPowerSpectrum(bias, pspec)

A power spectrum object with linear bias

FieldFilter()

Represents a filter acting on a field

GaussianFilter(context)

A Gaussian filter

HarmonicStepFilter(context)

A step filter in harmonic space

PowerSpectrum(context[, filename, k, Pk, ...])

A power spectrum object, which can be called to return the power spectrum at a given wavenumber.

PowerSpectrumCAMB(context[, use_context, ...])

A power spectrum object that calculates the power spectrum on the fly using CAMB.

TophatFilter(context)

A top-hat filter in real space