Top |
double | lnr0 | Read / Write |
guint | max-k-knots | Read / Write / Construct |
guint | max-z-knots | Read / Write / Construct |
NcmPowspec * | powerspectrum | Read / Write / Construct Only |
double | reltol | Read / Write / Construct |
double | reltol-z | Read / Write / Construct |
NcmPowspecFilterType | type | Read / Write / Construct |
double | zf | Read / Write |
double | zi | Read / Write |
#define | NCM_TYPE_POWSPEC_FILTER |
enum | NcmPowspecFilterType |
#define | NCM_POWSPEC_FILTER_DEFAULT_SIZE |
NcmPowspecFilter |
This class computes the filtered power spectrum, $\sigma^2(k, r)$, and its derivatives with respect to $\ln r$
(ncm_powspec_filter_eval_dnvar_dlnrn()
) using the FFTLog approach (see NcmFftlog),
\begin{equation}\label{eq:variance}
\sigma^2(r, z) = \frac{1}{2\pi^2} \int_0^\infty k^2 \ P(k, z) \vert W(k,r) \vert^2 \ \mathrm{d}k,
\end{equation}
where $P(k, z)$ is the power spectrum at mode $k$ and redshift $z$ and $W(k, r)$ is the filter (or window function).
NcmPowspecFilter * ncm_powspec_filter_new (NcmPowspec *ps
,NcmPowspecFilterType type
);
Creates a new NcmPowspecFilter from the power spectrum ps
.
NcmPowspecFilter *
ncm_powspec_filter_ref (NcmPowspecFilter *psf
);
Increases the reference count of psf
by one atomically.
void
ncm_powspec_filter_free (NcmPowspecFilter *psf
);
Atomically decrements the reference count of psf
by one.
If the reference count drops to 0, all memory allocated by psf
is released.
void
ncm_powspec_filter_clear (NcmPowspecFilter **psf
);
If psf
is different from NULL,
atomically decrements the reference count of psf
by one.
If the reference count drops to 0,
all memory allocated by psf
is released and psf
is set to NULL.
void ncm_powspec_filter_prepare (NcmPowspecFilter *psf
,NcmModel *model
);
Prepares the object applying the filter to the power spectrum.
void ncm_powspec_filter_prepare_if_needed (NcmPowspecFilter *psf
,NcmModel *model
);
Prepares (if necessary) the object applying the filter to the power spectrum.
void ncm_powspec_filter_set_type (NcmPowspecFilter *psf
,NcmPowspecFilterType type
);
Sets the type
of the NcmPowspecFilter to be used.
void ncm_powspec_filter_set_lnr0 (NcmPowspecFilter *psf
,gdouble lnr0
);
Sets the center of the transform output $\ln(r_0)$ (see ncm_fftlog_set_lnr0()
).
void
ncm_powspec_filter_set_best_lnr0 (NcmPowspecFilter *psf
);
Sets the value of $\ln(r_0)$ which gives the best results for the transformation based on the current value of $\ln(k_0)$.
void ncm_powspec_filter_set_reltol (NcmPowspecFilter *psf
,const gdouble reltol
);
Sets the relative tolerance for calibration in the distance direction.
void ncm_powspec_filter_set_reltol_z (NcmPowspecFilter *psf
,const gdouble reltol_z
);
Sets the relative tolerance for calibration in the redshift direction.
void ncm_powspec_filter_set_zi (NcmPowspecFilter *psf
,gdouble zi
);
Sets the inital time $z_i$.
void ncm_powspec_filter_set_zf (NcmPowspecFilter *psf
,gdouble zf
);
Sets the final time $z_f$.
void ncm_powspec_filter_require_zi (NcmPowspecFilter *psf
,gdouble zi
);
Require the initial time of at least $z_i$.
void ncm_powspec_filter_require_zf (NcmPowspecFilter *psf
,gdouble zf
);
Requires the final time of at least $z_f$.
NcmPowspecFilterType
ncm_powspec_filter_get_filter_type (NcmPowspecFilter *psf
);
Gets the type of filter used.
gdouble
ncm_powspec_filter_get_reltol (NcmPowspecFilter *psf
);
Gets the relative tolerance for calibration in the distance direction.
gdouble
ncm_powspec_filter_get_reltol_z (NcmPowspecFilter *psf
);
Gets the relative tolerance for calibration in the redshift direction.
gdouble
ncm_powspec_filter_get_r_min (NcmPowspecFilter *psf
);
This function returns $\sigma^2(r, z)$'s minimum evaluated distance.
gdouble
ncm_powspec_filter_get_r_max (NcmPowspecFilter *psf
);
This function returns $\sigma^2(r, z)$'s maximum evaluated distance.
gdouble ncm_powspec_filter_eval_lnvar_lnr (NcmPowspecFilter *psf
,const gdouble z
,const gdouble lnr
);
Evaluates the logarithm base e of the filtered power spectrum at lnr
and z
.
gdouble ncm_powspec_filter_eval_var (NcmPowspecFilter *psf
,const gdouble z
,const gdouble r
);
Evaluate the filtered variance at $r$.
gdouble ncm_powspec_filter_eval_var_lnr (NcmPowspecFilter *psf
,const gdouble z
,const gdouble lnr
);
Evaluates the filtered power spectrum at lnr
and z
.
gdouble ncm_powspec_filter_eval_sigma_lnr (NcmPowspecFilter *psf
,const gdouble z
,const gdouble lnr
);
Evaluate the square root of the filtered power spectrum at lnr
and z
.
gdouble ncm_powspec_filter_eval_sigma (NcmPowspecFilter *psf
,const gdouble z
,const gdouble r
);
Evaluates the square root of the filtered power spectrum at r
and z
.
gdouble ncm_powspec_filter_eval_dvar_dlnr (NcmPowspecFilter *psf
,const gdouble z
,const gdouble lnr
);
Evaluates the first derivative of the filtered
variance with respect to $\ln r$ at lnr
and z
.
gdouble ncm_powspec_filter_eval_dlnvar_dlnr (NcmPowspecFilter *psf
,const gdouble z
,const gdouble lnr
);
Evaluates the first derivative of the logarithm of the filtered
variance with respect to $\ln r$ at lnr
and z
.
gdouble ncm_powspec_filter_eval_dlnvar_dr (NcmPowspecFilter *psf
,const gdouble z
,const gdouble lnr
);
Evaluates the first derivative of the logarithm of the filtered
variance with respect to $r$ at lnr
and z
.
gdouble ncm_powspec_filter_eval_dnvar_dlnrn (NcmPowspecFilter *psf
,const gdouble z
,const gdouble lnr
,guint n
);
Evaluates the derivatives of the filtered variance at lnr
and z
, namely:
$n = 0 \rightarrow \sigma(r, z)^2$,
$n = 1 \rightarrow \frac{\mathrm{d}\sigma^2}{\mathrm{d} \ln r}$,
$n = 2 \rightarrow \frac{\mathrm{d}^2\sigma^2}{\mathrm{d}(\ln r)^2}$,
$n = 3 \rightarrow \frac{\mathrm{d}^3\sigma^2}{\mathrm{d}(\ln r)^3}$.
gdouble ncm_powspec_filter_eval_dnlnvar_dlnrn (NcmPowspecFilter *psf
,const gdouble z
,const gdouble lnr
,guint n
);
Evaluates the derivatives of the logarithm of the filtered variance at lnr
and z
, namely:
$n = 0 \rightarrow \ln \left[ \sigma(r, z)^2 \right]$,
$n = 1 \rightarrow \frac{\mathrm{d}\ln \left( \sigma^2 \right)}{\mathrm{d} \ln r}$,
$n = 2 \rightarrow \frac{\mathrm{d}^2 \ln \left( \sigma^2 \right)}{\mathrm{d}(\ln r)^2}$,
$n = 3 \rightarrow \frac{\mathrm{d}^3 \ln \left( \sigma^2 \right)}{\mathrm{d}(\ln r)^3}$.
gdouble
ncm_powspec_filter_volume_rm3 (NcmPowspecFilter *psf
);
Calculates the volume of the filter over $r^3$.
NcmPowspec *
ncm_powspec_filter_peek_powspec (NcmPowspecFilter *psf
);
Gets the NcmPowspec object used to compute the filtered variance $\sigma^{2}(r,z)$.
Filter type to apply to the power spectrum. See also NcmFftlogTophatwin2 and NcmFftlogGausswin2, for the top-hat and Gaussian filters, respectively.
“lnr0”
property “lnr0” double
The output center value for $\ln(r)$.
Owner: NcmPowspecFilter
Flags: Read / Write
Default value: 0
“max-k-knots”
property “max-k-knots” guint
The maximum number of knots in the k direction.
Owner: NcmPowspecFilter
Flags: Read / Write / Construct
Default value: 10000
“max-z-knots”
property “max-z-knots” guint
The maximum number of knots in the redshift direction.
Owner: NcmPowspecFilter
Flags: Read / Write / Construct
Default value: 1000
“powerspectrum”
property“powerspectrum” NcmPowspec *
The NcmPowspec object to be used to compute the variance $\sigma^{2}(r,z)$.
Owner: NcmPowspecFilter
Flags: Read / Write / Construct Only
“reltol”
property “reltol” double
The relative tolerance for calibration in the distance direction.
Owner: NcmPowspecFilter
Flags: Read / Write / Construct
Allowed values: [2.22045e-16,1]
Default value: 0.001
“reltol-z”
property “reltol-z” double
The relative tolerance for calibration in the redshift direction.
Owner: NcmPowspecFilter
Flags: Read / Write / Construct
Allowed values: [2.22045e-16,1]
Default value: 1e-06
“type”
property“type” NcmPowspecFilterType
The type of fliter used $W(k,r)$.
Owner: NcmPowspecFilter
Flags: Read / Write / Construct
Default value: NCM_POWSPEC_FILTER_TYPE_TOPHAT
“zf”
property “zf” double
The output final time $z_f$ of the variance $\sigma^{2}(r,z)$.
Owner: NcmPowspecFilter
Flags: Read / Write
Default value: 1