Class

NumCosmoMathPowspec

Description [src]

abstract class NumCosmoMath.Powspec : GObject.Object
{
  /* No available fields */
}

Abstrac class for power spectrum implementation.

This module comprises the set of functions to compute a power spectrum and derived quantities.

Given a field $\delta(\vec{x})$ at position $\vec{x}$, the power spectrum is defined as the Fourier transform of the two-point correlation point, i.e., $$\xi(\vec{x} - \vec{x}^\prime) = \int \frac{d^3 k}{(2 \pi)^3} e^{i \vec{k}.(\vec{x} - \vec{x}^\prime)} P(k),$$ where $\langle \delta(\vec{k} - \vec{k}^\prime)\rangle = (2\pi)^3 \delta_D(\vec{k} - \vec{k}^\prime) P(k)$ and $\delta_D$ is the Dirac’s delta function. The standard output is the dimensional power spectrum, not the dimensionless one $\Delta(k)^2$, $$P(k) \equiv \frac{2 \pi^2 \Delta(k)^2}{k^3}.$$.

Ancestors

Descendants

Functions

ncm_powspec_clear

If powspec is different from NULL, atomically decrements the reference count of powspec by one. If the reference count drops to 0, all memory allocated by powspec is released and powspec is set to NULL.

Instance methods

ncm_powspec_corr3d

Computes the spatial correlation function in configuration space at redshift $z$ and position $r$, $$\xi(r,z) = \frac{1}{2\pi^2} \int_{k_{\mathrm{min}}}^{k_\mathrm{max}} P(k,z) \, j_{0}(kr) \, k^2 \, \mathrm{d}k \, ,$$ where, $j_0(t)$ is the zero order spherical Bessel function of the first kind. This function is recommended for a small set of $r$ and $z$ values. For a wide range of values it is best to apply NcmPowspecCorr3d, instead.

ncm_powspec_deriv_k

Evaluates the derivative of the power spectrum powspec with respect to $k$ at $(z, k)$.

ncm_powspec_deriv_z

Evaluates the derivative of the power spectrum powspec with respect to $z$ at $(z, k)$.

ncm_powspec_eval

Evaluates the power spectrum powspec at $(z, k)$.

ncm_powspec_eval_vec

Evaluates the power spectrum powspec at $z$ and in the knots contained in k and puts the result in Pk.

ncm_powspec_free

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

ncm_powspec_get_kmax

Gets the maximum mode value $k_\mathrm{max}$.

ncm_powspec_get_kmin

Gets the minimum mode value $k_\mathrm{min}$.

ncm_powspec_get_nknots

Gets the number of knots used to calculate the power spectrum.

ncm_powspec_get_reltol_spline

Gets the relative tolerance for interpolation errors.

ncm_powspec_get_spline_2d

Compute a 2D spline for the power spectrum.

ncm_powspec_get_zf

Gets the final value $z_f$.

ncm_powspec_get_zi

Gets the initial value $z_i$.

ncm_powspec_peek_model_ctrl

Gets the NcmModelCtrl used by powspec.

ncm_powspec_prepare

Prepares the power spectrum powspec using the model model.

ncm_powspec_prepare_if_needed

Prepares the object powspec using the model model if it was changed since last preparation.

ncm_powspec_ref

Increases the reference count of powspec by one atomically.

ncm_powspec_require_kmax

Sets the maximum mode value $k_\mathrm{max}$.

ncm_powspec_require_kmin

Requires the minimum mode value to be less or equal to $k_\mathrm{min}$.

ncm_powspec_require_zf

Requires the final time to be greater or equal to $z_f$.

ncm_powspec_require_zi

Requires the initial time to be less or equal to $z_i$.

ncm_powspec_set_kmax

Sets the maximum mode value $k_\mathrm{max}$.

ncm_powspec_set_kmin

Sets the minimum mode value $k_\mathrm{min}$.

ncm_powspec_set_reltol_spline

Sets the relative tolerance for interpolation errors to reltol.

ncm_powspec_set_zf

Sets the final time $z_f$.

ncm_powspec_set_zi

Sets the initial time $z_i$.

ncm_powspec_sigma_tophat_R

Computes $\sigma_R(z) = \sqrt{\sigma_{R}^{2}(z)}$. See ncm_powspec_var_tophat_R().

ncm_powspec_sproj

Computes (C_\ell (z_1, z_2) = \int\dots). This method calculates the angular power spectrum directly from the power spectrum by integrating over the wave-numbers. It is slow and intended for testing purposes only.

ncm_powspec_var_tophat_R

This function computes the value of the linearly extrapolated rms fluctuations of mass in a sphere of radius $R$ applying a top-hat filter at redshift $z$, $$\sigma_{R}^{2}(z) = \frac{1}{2\pi^2} \int_{k_{\mathrm{min}}}^{k_\mathrm{max}} W^{2}{TH}(kR) \, P(k,z) \, k^2 \, \mathrm{d}k \, .$$ Where, $W{TH}(t)$ is the top-hat filter in Fourier space, $$W_{TH}(t) = \frac{3}{t^3} \left( \sin t - t \cos t \right) = \frac{3}{t} j_{1}(t),$$ and $j_1(t)$ is the first order spherical Bessel function of the first kind. This function is recommended for a small set of $z$ and $R$ values. For a wide range of values it is best to apply NcmPowspecFilter, instead.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

NumCosmoMath.Powspec:kmax

The maximum mode (wave-number) value to compute $P(k,z)$.

NumCosmoMath.Powspec:kmin

The minimum mode (wave-number) value to compute $P(k,z)$.

NumCosmoMath.Powspec:reltol

The relative tolerance on the interpolation error.

NumCosmoMath.Powspec:zf

The final time (redshift) to compute $P(k,z)$.

NumCosmoMath.Powspec:zi

The initial time (redshift) to compute $P(k,z)$.

Signals

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct NumCosmoMathPowspecClass {
  void (* prepare) (
    NcmPowspec* powspec,
    NcmModel* model
  );
  gdouble (* eval) (
    NcmPowspec* powspec,
    NcmModel* model,
    const gdouble z,
    const gdouble k
  );
  void (* eval_vec) (
    NcmPowspec* powspec,
    NcmModel* model,
    const gdouble z,
    NcmVector* k,
    NcmVector* Pk
  );
  gdouble (* deriv_z) (
    NcmPowspec* powspec,
    NcmModel* model,
    const gdouble z,
    const gdouble k
  );
  gdouble (* deriv_k) (
    NcmPowspec* powspec,
    NcmModel* model,
    const gdouble z,
    const gdouble k
  );
  void (* get_nknots) (
    NcmPowspec* powspec,
    guint* Nz,
    guint* Nk
  );
  NcmSpline2d* (* get_spline_2d) (
    NcmPowspec* powspec,
    NcmModel* model
  );
  
}

No description available.

Class members
prepare: void (* prepare) ( NcmPowspec* powspec, NcmModel* model )

No description available.

eval: gdouble (* eval) ( NcmPowspec* powspec, NcmModel* model, const gdouble z, const gdouble k )

No description available.

eval_vec: void (* eval_vec) ( NcmPowspec* powspec, NcmModel* model, const gdouble z, NcmVector* k, NcmVector* Pk )

No description available.

deriv_z: gdouble (* deriv_z) ( NcmPowspec* powspec, NcmModel* model, const gdouble z, const gdouble k )

No description available.

deriv_k: gdouble (* deriv_k) ( NcmPowspec* powspec, NcmModel* model, const gdouble z, const gdouble k )

No description available.

get_nknots: void (* get_nknots) ( NcmPowspec* powspec, guint* Nz, guint* Nk )

No description available.

get_spline_2d: NcmSpline2d* (* get_spline_2d) ( NcmPowspec* powspec, NcmModel* model )

No description available.

Virtual methods

NumCosmoMath.PowspecClass.deriv_k

Evaluates the derivative of the power spectrum powspec with respect to $k$ at $(z, k)$.

NumCosmoMath.PowspecClass.deriv_z

Evaluates the derivative of the power spectrum powspec with respect to $z$ at $(z, k)$.

NumCosmoMath.PowspecClass.eval

Evaluates the power spectrum powspec at $(z, k)$.

NumCosmoMath.PowspecClass.eval_vec

Evaluates the power spectrum powspec at $z$ and in the knots contained in k and puts the result in Pk.

NumCosmoMath.PowspecClass.get_nknots

Gets the number of knots used to calculate the power spectrum.

NumCosmoMath.PowspecClass.get_spline_2d

Compute a 2D spline for the power spectrum.

NumCosmoMath.PowspecClass.prepare

Prepares the power spectrum powspec using the model model.