hmf.filtersΒΆ

A module containing various smoothing filter models.

Filters handle the calculation of the mass variance from the power spectrum, via a window function. Subclasses of BaseFilter implement specific window functions.

Besides the raw filter function itself, two quantities are of primary interest: firstly the mass variance (see sigma()), which appears in many cosmological applications, and secondly its logarithmic derivative with mass, which appears in the Press-Schechter formalism for the halo mass function.

To remain extensible and general, the methodology in these classes is to calculate the latter quantity as

\[\frac{d\ln\sigma}{d\ln m} = \frac{1}{2} \frac{d \ln \sigma^2}{d\ln R} \frac{d\ln R}{d\ln m}.\]

Each of the quantities on the right can be separately calculated, improving extensibility.

The factor \(\frac{d\ln R}{d\ln m}\) is typically 1/3, but this is not necessarily the case for window functions of arbitrary shape.

Base Component(s)

BaseFilter(k, power, **model_parameters)

Base class for Filter components.

Models

Filter

Gaussian(k, power, **model_parameters)

Gaussian window function.

SharpK(k, power, **model_parameters)

Fourier-space top-hat window function.

SharpKEllipsoid(k, power, **model_parameters)

Fourier-space top-hat window function with ellipsoidal correction.

TopHat(k, power, **model_parameters)

Real-space top-hat window function.