This archive contains a basic version of the code used in M. Kerscher, A&A 666 (2022) A181 https://doi.org/10.1051/0004-6361/202243632 https://arxiv.org/abs/2203.13288 It implements the standard, the exact, and an improved version of the Landy & Szalay estimator. * As prerequisites you need - a Python environment with numpy and scipy (> 1.7.0), for example Anaconda https://docs.anaconda.com/anaconda/install/index.html - pybind11, which is used to interface the C++ code from within python https://pybind11.readthedocs.io/en/stable/installing.html - a C++ compiler which supports OpenMP; g++ under Linux works. On MacOS I suggest you disable OpenMP in the Makefile (in principle it should be possible to use OpenMP on MacOS, but I did not have enough pertinacity). * As soon as pybind11 is installed, typing make should create the shared libarary from cppauxiliary.cpp such that the parallelized C++ functions can be called from python. For details see the Makefile and pyauxiliary.py. * In pyauxiliary.py you find the code implementing the standard Landy & Szalay estimator using the pair-counts DD, DR, and RR, as well as the exact estimator and the estimator using quasi Monte Carlo. There we call the functions from the shared library. * The code for the area fraction is in baddeley.py . If you use baddeley.py please give credit to A.J. Baddeley, R.A. Moyeed, C.V.Howard, A.Boyde, Appl. Statist., 42, 641 (1993). The implementation in baddeley.py follows closely the C-code in sphefrac.c from the R package spatstat (written by A.J. Baddeley). Errors in the python implementation should be blamed on me. * A simple example using the different estimators is given in xi.py. It reads the point set from "points.pt", calculates the different estimates of the two-point correlation function, and then prints and plots them (compare cxi.pdf and cxilog.pdf). * On a small desktop machine (from 2018) this calculation took less than 2 min. In the example xi.py, the numerical integration for the exact result requires most of the time. This changes quickly if you increase the number of points. And clearly the number of points should be increased for serious work. If you find my code helpful it would be nice if you could cite the article mentioned on top this file. All the best Martin Kerscher Munich, October 2022