Window Function Abstract Class

Window Function Abstract Class — Defines the prototype of the NcWindow object.

Object Hierarchy

    GObject
    ╰── NcWindow
        ├── NcWindowGaussian
        ╰── NcWindowTophat

Description

This module comprises the set of functions to compute the window function in both real and Fourier spaces as well as its derivative with respect to the scale $R$ in Fourier space.

In order to study the statistical properties of the density fluctuation field at a certain scale $R$, we use the window function. As an example, to compute the variance of the density contrast at scale $R$, we convolve the window function in the Fourier space with the power spectrum.

Functions

nc_window_new_from_name ()

NcWindow *
nc_window_new_from_name (gchar *window_name);

This function returns a new NcWindow whose type is defined by window_name string.

Parameters

window_name

"NcWindowTophat" or "NcWindowGaussian".

 

Returns

A new NcWindow.


nc_window_volume ()

gdouble
nc_window_volume (NcWindow *wf);

This function returns the volume of the region (with radius 1) defined by the window function.

Top-hat volume: NC_WINDOW_VOLUME_TOPHAT.

Gaussian volume: NC_WINDOW_VOLUME_GAUSSIAN.

Parameters

wf

a NcWindow.

 

Returns

The volume (with radius 1) defined by wf .


nc_window_eval_fourier ()

gdouble
nc_window_eval_fourier (const NcWindow *wf,
                        const gdouble k,
                        const gdouble R);

This function computes the window function in the Fourier space.

Parameters

wf

a NcWindow.

 

k

mode.

 

R

scale.

 

Returns

The value of the window function in the Fourier space at scale R .


nc_window_deriv_fourier ()

gdouble
nc_window_deriv_fourier (const NcWindow *wf,
                         const gdouble k,
                         const gdouble R);

This function returns the derivative with respect to R of the window function in the Fourier space.

Parameters

wf

a NcWindow.

 

k

mode.

 

R

scale.

 

Returns

The value of the first derivative of the window function in the Fourier space at scale R .


nc_window_eval_realspace ()

gdouble
nc_window_eval_realspace (const NcWindow *wf,
                          const gdouble r,
                          const gdouble R);

This function computes the window function in real space.

Parameters

wf

a NcWindow.

 

r

distance module to the center point of the filtered region.

 

R

scale.

 

Returns

The value of the window function in the real space at scale R .


nc_window_free ()

void
nc_window_free (NcWindow *wf);

Atomically decrements the reference count of wf by one. If the reference count drops to 0, all memory allocated by wf is released.

Parameters

wf

a NcWindow.

 

nc_window_clear ()

void
nc_window_clear (NcWindow **wf);

Atomically decrements the reference count of wf by one. If the reference count drops to 0, all memory allocated by wf is released. Set the pointer to NULL;

Parameters

wf

a NcWindow.

 

Types and Values