Class
NumCosmoMathPowspecFilter
Description [src]
final class NumCosmoMath.PowspecFilter : GObject.Object
{
/* No available fields */
}
Variance of a power spectrum smoothed by a window, on a grid in $(r, z)$.
Computes
$$\sigma^2(r, z) = \frac{1}{2\pi^2} \int k^2 P(k, z) \, W^2(kr) \, \mathrm{d}k,$$
with $W$ the top-hat or Gaussian window (NcmPowspecFilterType), and its derivatives
with respect to $\ln r$ (ncm_powspec_filter_eval_dnvar_dlnrn()), by an NcmFftlog
transform, and interpolates them with bicubic splines in $(\ln r, z)$.
The transform runs over the $k$ range of the power spectrum, continued beyond it by
ncm_fftlog_use_smooth_padding(), with the bias that ncm_fftlog_get_best_bias() chooses
from the log-slopes of $k^2 P(k, z)$ at the ends of the table. Within a few e-foldings
of $R = 1/k_\mathrm{max}$ and $R = 1/k_\mathrm{min}$ the result depends on that
continuation, an extrapolation of the table; ncm_powspec_filter_get_r_min() and
ncm_powspec_filter_get_r_max() return the whole grid, those edges included.
The evaluation functions do not check their arguments: they are valid for $r$ in [ncm_powspec_filter_get_r_min(), ncm_powspec_filter_get_r_max()] and $z$ in [NcmPowspecFilter:zi, NcmPowspecFilter:zf], and outside they return the extrapolation of the splines.
Instance methods
ncm_powspec_filter_eval_dnlnvar_dlnrn
Evaluates $\mathrm{d}^n\ln\sigma^2 / \mathrm{d}(\ln r)^n$ at $(r, z)$ from the derivatives of $\sigma^2$; $n = 2$ needs NcmPowspecFilter:nderivs of at least 2, and $n > 2$ aborts.
ncm_powspec_filter_eval_dnvar_dlnrn
Evaluates $\mathrm{d}^n\sigma^2 / \mathrm{d}(\ln r)^n$ at $(r, z)$, with $n = 0$ giving $\sigma^2(r, z)$ itself.
ncm_powspec_filter_free
Atomically decrements the reference count of psf by one.
If the reference count drops to 0, all memory allocated by psf is released.
ncm_powspec_filter_get_nknots
Gets the size of the grid the last calibration chose, both zero before the first ncm_powspec_filter_prepare().
ncm_powspec_filter_get_r_max
The maximum distance at which $\sigma^2(r, z)$ is tabulated: the last knot of the
calibrated grid, or its estimate from NcmPowspecFilter:lnr0 before the first ncm_powspec_filter_prepare().
ncm_powspec_filter_get_r_min
The minimum distance at which $\sigma^2(r, z)$ is tabulated: the first knot of the
calibrated grid, or its estimate from NcmPowspecFilter:lnr0 before the first ncm_powspec_filter_prepare().
ncm_powspec_filter_prepare
Prepares the power spectrum if needed, calibrates the grid when it is not calibrated, and fills $\sigma^2(r, z)$ and its derivatives on it.
ncm_powspec_filter_prepare_if_needed
Calls ncm_powspec_filter_prepare() if model or a setting of psf changed since
the last preparation, and always when model is NULL.
ncm_powspec_filter_require_nderivs
Requires derivatives up to at least order $n$. Requests at or below the order already in use do nothing, so several users of the same filter may each state their own minimum without any of them lowering an order another one needs.
ncm_powspec_filter_set_best_lnr0
Sets the transform over the $k$ range of the power spectrum with $k_0 r_0 = 1$, so the output grid is $r \in [1/k_\mathrm{max}, 1/k_\mathrm{min}]$.
ncm_powspec_filter_set_lnr0
Sets the center of the output grid (see ncm_fftlog_set_lnr0()); the next prepare recalibrates. Warns when $k_0 r_0 < 1$.
ncm_powspec_filter_set_max_k_knots
Sets NcmPowspecFilter:max-k-knots, the most knots the calibration may use. A change
makes the next ncm_powspec_filter_prepare() calibrate again.
ncm_powspec_filter_set_max_z_knots
Sets NcmPowspecFilter:max-z-knots. A change makes the next ncm_powspec_filter_prepare()
calibrate again.
ncm_powspec_filter_set_nderivs
Sets the highest order $n$ of $\mathrm{d}^n\sigma^2/\mathrm{d}(\ln r)^n$ obtained
from the transform itself. Lowering the order discards the extra tables, so
prefer ncm_powspec_filter_require_nderivs() whenever the filter may be shared.
ncm_powspec_filter_set_reltol
Sets NcmPowspecFilter:reltol; a change makes the next prepare recalibrate.
ncm_powspec_filter_set_reltol_z
Sets NcmPowspecFilter:reltol-z; a change makes the next prepare recalibrate.
ncm_powspec_filter_set_type
Sets the window to type; a change rebuilds the transform and the next prepare recalibrates.
ncm_powspec_filter_set_zf
Sets NcmPowspecFilter:zf and requires it of the power spectrum (see ncm_powspec_require_zf()); the next prepare recalibrates.
ncm_powspec_filter_set_zi
Sets NcmPowspecFilter:zi and requires it of the power spectrum (see ncm_powspec_require_zi()); the next prepare recalibrates.
Properties
NumCosmoMath.PowspecFilter:max-k-knots
The maximum number of knots in the k direction; ncm_powspec_filter_prepare() aborts if
the calibration would need more (see ncm_fftlog_calibrate_size_gsl()).
NumCosmoMath.PowspecFilter:max-z-knots
The maximum number of knots in the redshift direction, zero for no limit;
ncm_powspec_filter_prepare() aborts if the grid would need more to reach
NcmPowspecFilter:reltol-z.
NumCosmoMath.PowspecFilter:nderivs
Highest order $n$ of $\mathrm{d}^n\sigma^2/\mathrm{d}(\ln r)^n$ computed by the transform itself. Each additional order costs one extra Mellin kernel, output vector and two-dimensional spline, so the default of one covers the common case.
NumCosmoMath.PowspecFilter:reltol
Tolerance of the calibration in the distance direction: the number of knots grows until $\sigma^2$ and its derivatives change by less than this between sizes, relative to each one’s peak over the whole $R$ grid, not to its value at each $R$. Where $\sigma^2$ is far below its peak, at large $R$, the relative accuracy is lower.
NumCosmoMath.PowspecFilter:reltol-z
Relative tolerance of the calibration of the $z$ knots, on $\sigma^2$ at the smallest $r$.
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.