Method
NumCosmoMathSphereXito_chebyshev
Declaration [src]
void
ncm_sphere_xi_to_chebyshev (
NcmSphereXi* sxi,
NcmMatrix* C_ells,
const guint lmin,
NcmMatrix* c
)
Description [src]
Computes, for every row of C_ells, the Chebyshev coefficients $c_k$ of the angular
correlation function truncated at $\ell_\mathrm{max}$,
$$
\xi(\theta) = \sum_{\ell=0}^{\ell_\mathrm{max}} \frac{2\ell + 1}{4\pi} C_\ell P_\ell(\cos\theta)
= \sum_{k=0}^{\ell_\mathrm{max}} c_k T_k(\cos\theta) = \sum_{k=0}^{\ell_\mathrm{max}} c_k \cos(k\theta),
$$
the multipoles below lmin taken as zero. The cost is $\ell_\mathrm{max}^2 / 4$
multiplications per spectrum. Evaluate the result with ncm_sphere_xi_eval_chebyshev() or
ncm_sphere_xi_eval_chebyshev_grid(), which work in $\theta$; a Clenshaw sum in
$x = \cos\theta$, such as ncm_spectral_chebyshev_eval(), forms $x$ and loses accuracy at
small $\theta$: measured $2$ to $4 \times 10^{-11}$ of the largest $|\xi|$ on
$[2.5’, 250’]$ for $\ell_\mathrm{max}$ from 2000 to $10^5$. Aborts when NcmSphereXi:lmax is
zero, when the last column of C_ells is above NcmSphereXi:lmax, and when c does not
have the rows of C_ells and $\ell_\mathrm{max} + 1$ columns. The scratch space belongs to
sxi, so concurrent calls on one object are not allowed.
Parameters
C_ells-
Type:
NcmMatrixA
NcmMatrixwith one spectrum per row, column $j$ holding $C_{\ell_\mathrm{min} + j}$.The data is owned by the caller of the method. lmin-
Type:
const guintThe multipole of the first column of
C_ells. c-
Type:
NcmMatrixA
NcmMatrixfor the result, one row per spectrum and $\ell_\mathrm{max} + 1$ columns.The data is owned by the caller of the method.