Class
NumCosmoXcorKernel
Description [src]
abstract class NumCosmo.XcorKernel : NumCosmoMath.Model
{
/* No available fields */
}
Base object for the kernels of projected observables used in cross-correlations.
The projected field and its kernel are linked by \begin{equation} $A(\hat{\mathbf{n}}) = \int_0^\infty dz \ W^A(z) \ \delta(\chi(z)\hat{\mathbf{n}}, z)$ \end{equation} where $\delta$ is the matter density field.
Kernels also implement the noise power spectrum.
Functions
nc_xcor_kernel_clear
Atomically decrements the reference count of xclk by one.
If the reference count drops to zero, all memory allocated by xclk is
released. xclk is set to NULL after being freed.
nc_xcor_kernel_log_all_models
Logs all registered NcXcorLimberKernel subclasses to the message log.
This is useful for debugging and discovering available kernel implementations.
Instance methods
nc_xcor_kernel_eval_limber_z
Evaluates the Limber kernel at redshift z for multipole l.
The kinetic quantities (comoving distance and Hubble parameter) are
provided in xck. Returns zero if z is outside the kernel’s redshift range.
nc_xcor_kernel_eval_limber_z_full
Evaluates the Limber kernel at redshift z for multipole l, including
the normalization factor. This function computes the kinetic quantities
internally using dist and applies the kernel’s constant factor.
nc_xcor_kernel_free
Decreases the reference count of xclk by one. If the reference count
reaches zero, the object is freed.
nc_xcor_kernel_get_adaptive_boundary_tries
Gets the number of consecutive boundary points that must be below the convergence threshold before stopping boundary extension. This helps avoid false positives where a single low point prematurely stops the adaptive k-range determination.
nc_xcor_kernel_get_adaptive_epsilon
Gets the convergence threshold for adaptive k-range determination in the non-Limber integrand. The algorithm stops extending the k range when all component contributions drop below epsilon times the maximum kernel value.
nc_xcor_kernel_get_eval
Gets an evaluation function for the kernel at multipole l.
Convenience wrapper around nc_xcor_kernel_get_eval_vectorized() for a single multipole.
nc_xcor_kernel_get_eval_vectorized
Gets a vectorized evaluation function for the kernel over a range of multipoles. The returned integrand will have len = lmax - lmin + 1, and will evaluate all multipoles in the range [lmin, lmax] simultaneously.
nc_xcor_kernel_get_expansion_factor
Gets the expansion factor used for domain extension in the non-Limber integrand construction. This determines how much the domain is extended in each iteration.
nc_xcor_kernel_get_k_range
Gets the valid k range for the kernel at multipole l.
Uses the component-based implementation.
nc_xcor_kernel_get_l_limber
Gets the Limber approximation threshold for the kernel. Returns -1 for never using Limber, 0 for always using Limber, or N > 0 to use Limber for l >= N.
nc_xcor_kernel_get_max_border_expansions
Gets the maximum number of border expansion iterations allowed during domain extension in the non-Limber integrand construction.
nc_xcor_kernel_get_max_iter
Gets the maximum number of adaptive midpoint refinement iterations allowed in the non-Limber integrand construction.
nc_xcor_kernel_get_reltol
Gets the relative tolerance used for adaptive midpoint refinement in the non-Limber integrand construction.
nc_xcor_kernel_get_z_range
Get the redshift range of the kernel. This is a virtual method that must be implemented by subclasses.
nc_xcor_kernel_obs_params_len
Gets the number of parameters needed to describe the observables for this kernel (e.g., measurement uncertainties, systematic parameters).
nc_xcor_kernel_peek_dist
Peeks the distance object from the kernel. This method is intended for use by subclass implementations.
nc_xcor_kernel_peek_integrator
Peeks the spherical Bessel integrator object from the kernel. This method is intended for use by subclass implementations. Returns NULL if no integrator is set.
nc_xcor_kernel_peek_powspec
Peeks the power spectrum object from the kernel. This method is intended for use by subclass implementations.
nc_xcor_kernel_prepare
Prepares the kernel for evaluation with the given cosmological model.
This may involve precomputing quantities that depend on cosmo but not
on redshift or multipole.
nc_xcor_kernel_set_adaptive_boundary_tries
Sets the number of consecutive boundary points that must be below the convergence threshold before stopping boundary extension. Higher values provide more robust convergence detection at the cost of additional function evaluations. Typical values range from 2 to 5.
nc_xcor_kernel_set_adaptive_epsilon
Sets the convergence threshold for adaptive k-range determination in the non-Limber integrand. Typical values range from 1e-4 to 1e-8, with smaller values providing more accurate integration at the cost of more evaluations.
nc_xcor_kernel_set_expansion_factor
Sets the expansion factor for domain extension. Larger values result in more aggressive expansion. Typical values range from 0.1 to 0.5.
nc_xcor_kernel_set_max_border_expansions
Sets the maximum number of border expansion iterations. Higher values allow the domain to extend further when needed, at the cost of potentially more function evaluations. Typical values range from 1000 to 10000.
nc_xcor_kernel_set_max_iter
Sets the maximum number of adaptive midpoint refinement iterations. Higher values allow for more refinement passes when needed. Typical values range from 1000 to 100000.
nc_xcor_kernel_set_reltol
Sets the relative tolerance for adaptive midpoint refinement. Smaller values provide more accurate spline interpolation at the cost of more sample points. Typical values range from 1e-4 to 1e-8.
nc_xcor_kernel_set_scaled_abstol
Sets the absolute minimum threshold for adaptive midpoint refinement. This parameter helps prevent excessive refinement in cases where the kernel has very low amplitude, by providing a floor below which the refinement will stop regardless of the relative tolerance.
Properties
Properties inherited from NcmModel (9)
NumCosmoMath.Model:implementation
NumCosmoMath.Model:name
NumCosmoMath.Model:nick
NumCosmoMath.Model:params-types
NumCosmoMath.Model:reparam
NumCosmoMath.Model:scalar-params-len
NumCosmoMath.Model:sparam-array
NumCosmoMath.Model:submodel-array
NumCosmoMath.Model:vector-params-len
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 NumCosmoXcorKernelClass {
void (* get_z_range) (
NcXcorKernel* xclk,
gdouble* zmin,
gdouble* zmax,
gdouble* zmid
);
gdouble (* eval_limber_z) (
NcXcorKernel* xclk,
NcHICosmo* cosmo,
gdouble z,
const NcXcorKinetic* xck,
gint l
);
gdouble (* eval_limber_z_prefactor) (
NcXcorKernel* xclk,
NcHICosmo* cosmo,
gint l
);
void (* prepare) (
NcXcorKernel* xclk,
NcHICosmo* cosmo
);
void (* add_noise) (
NcXcorKernel* xclk,
NcmVector* vp1,
NcmVector* vp2,
guint lmin
);
guint (* obs_len) (
NcXcorKernel* xclk
);
guint (* obs_params_len) (
NcXcorKernel* xclk
);
GPtrArray* (* get_component_list) (
NcXcorKernel* xclk
);
}
No description available.
Class members
get_z_range: void (* get_z_range) ( NcXcorKernel* xclk, gdouble* zmin, gdouble* zmax, gdouble* zmid )No description available.
eval_limber_z: gdouble (* eval_limber_z) ( NcXcorKernel* xclk, NcHICosmo* cosmo, gdouble z, const NcXcorKinetic* xck, gint l )No description available.
eval_limber_z_prefactor: gdouble (* eval_limber_z_prefactor) ( NcXcorKernel* xclk, NcHICosmo* cosmo, gint l )No description available.
prepare: void (* prepare) ( NcXcorKernel* xclk, NcHICosmo* cosmo )No description available.
add_noise: void (* add_noise) ( NcXcorKernel* xclk, NcmVector* vp1, NcmVector* vp2, guint lmin )No description available.
obs_len: guint (* obs_len) ( NcXcorKernel* xclk )No description available.
obs_params_len: guint (* obs_params_len) ( NcXcorKernel* xclk )No description available.
get_component_list: GPtrArray* (* get_component_list) ( NcXcorKernel* xclk )No description available.
Virtual methods
NumCosmo.XcorKernelClass.eval_limber_z
Evaluates the Limber kernel at redshift z for multipole l.
The kinetic quantities (comoving distance and Hubble parameter) are
provided in xck. Returns zero if z is outside the kernel’s redshift range.
NumCosmo.XcorKernelClass.get_z_range
Get the redshift range of the kernel. This is a virtual method that must be implemented by subclasses.
NumCosmo.XcorKernelClass.obs_params_len
Gets the number of parameters needed to describe the observables for this kernel (e.g., measurement uncertainties, systematic parameters).
NumCosmo.XcorKernelClass.prepare
Prepares the kernel for evaluation with the given cosmological model.
This may involve precomputing quantities that depend on cosmo but not
on redshift or multipole.