Method

NumCosmoXcorKernelIntegrandset_tolerances

Declaration [src]

void
nc_xcor_kernel_integrand_set_tolerances (
  NcXcorKernelIntegrand* integrand,
  gdouble reltol,
  gdouble peak_epsilon
)

Description [src]

Records the criterion integrand was fitted to, in the two parts it actually has. ncm_function_sample_set_refine() accepts a point when

$$ \Vert f - \tilde f \Vert_2 \le \mathrm{reltol} \Vert f \Vert_2 + a \Vert f \Vert_2^\mathrm{max} $$

so the two govern different regions: the floor is added, not maxed, and is scaled to the peak, which leaves reltol biting only where the function is within a few orders of that peak. Keeping them apart matters downstream — they reach a $C_\ell$ differently, the floor through the product of two closures. See nc_xcor_compute_full().

A spline-backed integrand is a fit, not the function, and the quadratures that consume it have no other way to learn how good a fit. NC_XCOR_METHOD_KERNEL_EXACT integrates it exactly, so this is the whole of its error budget.

Parameters

reltol

Type: gdouble

The relative half of the fit criterion.

peak_epsilon

Type: gdouble

Its floor, as a fraction of the fitted function’s own peak.