landyszalay {cooltools} | R Documentation |
Two-point correlation estimation
Description
Evaluates the Landy-Szalay (1993) estimator of the two-point correlation function of a point set D given a random comparison set R. The two point sets D and R can be made of different numbers of points, as the pair-counts are automatically normalized according to the number of points. In fact, it is often preferable to make the R set larger to reduce the R-related shot noise in the two-point estimator.
Usage
landyszalay(D, R, dr = 0.1, cpp = TRUE)
Arguments
D |
n-element vector or n-by-d matrix of d-dimensional positions of the data points |
R |
m-element vector or m-by-d matrix of d-dimensional positions of the random comparison points |
dr |
bin size for the evaluation of the two-point correlation function |
cpp |
logical flag; if set to TRUE (default) a fast implementation in C++ is used to count the point-pairs in distance bins, otherwise the counting is performed less efficiently in R. |
Value
Returns a data frame with the two-point statistics of the data points:
r |
vector with the mid-points of the distance bins for which the two-point correlation function has been evaluated. |
xi |
values of the two-point correlation function at the distances r. |
err |
Poisson errors of xi. |
Author(s)
Danail Obreschkow