Window Function Abstract Class

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

Synopsis

struct              NcWindow;
struct              NcWindowClass;
void                nc_window_clear                     (NcWindow **wf);
gdouble             nc_window_deriv_fourier             (const NcWindow *wf,
                                                         const gdouble k,
                                                         const gdouble R);
gdouble             nc_window_eval_fourier              (const NcWindow *wf,
                                                         const gdouble k,
                                                         const gdouble R);
gdouble             nc_window_eval_realspace            (const NcWindow *wf,
                                                         const gdouble r,
                                                         const gdouble R);
void                nc_window_free                      (NcWindow *wf);
NcWindow *          nc_window_new_from_name             (gchar *window_name);
gdouble             nc_window_volume                    (NcWindow *wf);

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.

Details

struct NcWindow

struct NcWindow;

struct NcWindowClass

struct NcWindowClass {
};

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;

wf :

a NcWindow.

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.

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_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.

wf :

a NcWindow.

k :

mode.

R :

scale.

Returns :

The value 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.

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.

wf :

a NcWindow.

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.

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.

wf :

a NcWindow.

Returns :

The volume (with radius 1) defined by wf.