# nbodykit.filters¶

Classes

 Gaussian(r) A gaussian filter TopHat(r) A TopHat filter defined in Fourier space.
class nbodykit.filters.Gaussian(r)[source]

A gaussian filter

$G(r) = exp(-0.5 k^2 r^2)$

Methods

 filter(k, v) Apply a filter based on coordinate variables x and field value v.
__init__(r)[source]
Parameters: r (float) – radius of the Gaussian filter
filter(k, v)[source]

Apply a filter based on coordinate variables x and field value v.

It shall return the new field value with the same shape of v. :param x: a list of arrays for the coordiantes of v :type x: list

class nbodykit.filters.TopHat(r)[source]

A TopHat filter defined in Fourier space.

Notes

A fourier space filter is different from a configuration space filter. The TopHat in fourier space creates ringing effects due to the truncation / discretization of modes.

Methods

 filter(k, v) Apply a filter based on coordinate variables x and field value v.
__init__(r)[source]
Parameters: r (float) – radius of the TopHat filter
filter(k, v)[source]

Apply a filter based on coordinate variables x and field value v.

It shall return the new field value with the same shape of v. :param x: a list of arrays for the coordiantes of v :type x: list