s4PCF - code to compute the 4-point correllation function (4PCF) binned by distances between 2 different pairs of galaxies
Currently consists of two different executables:
s4PCF
in main directory - counts quadruplets (also pairs and triplets) in bins. Based on encore by Oliver Philcox.run_npcf.py
script (modernized version ofrun_npcf.csh
) combines data and random catalogs, invokes the C++ code to count quadruplets, and divides counts to get 4,2,3-point correlation functions.gs4PCF
ingaussian_s4PCF
subdirectory - randomly throws quadruplets from random catalog and averages the disconnected/Gaussian contribution to 4PCF. Based on RascalC by Oliver Philcox, comes with a bunch of useful python scripts.
Their better integration is work in progress.
Quadruplets of galaxies A, B, C, D (or encore
(which also uses higher order multipoles).
The aim is to isolate two close pairs better.
AB (NBIN_LONG
bins are uniformly spaced between rmin_long
and rmax_long
.
AC and BD (NBIN_SHORT
bins are uniformly spaced between rmin_short
and rmax_short
.
BD (
s4PCF
produces anisotropic 2-point correlation function in NBIN_CF
radial bins between rmin_cf
anf rmax_cf
and in MBIN_CF
mu (abs(cos(theta))) bins between 0 and 1, which can serve as input to gs4PCF
. It also outputs isotropic 2- and 3-point correlation functions in NBIN_SHORT
bins uniformly spaced between rmin_short
and rmax_short
, as a by-product.
If rmin_long < 2 * rmax_short
, a triple loop is activated to exclude self-counting triangles (C=D or
Additionally, when rmin_long < rmax_short
other possibilities arise: A=D (
Both codes now have an option (PREVENT_TRIANGLES
in s4PCF
and prevent_triangles
in gs4PCF
, set in gaussian_s4PCF/modules/parameters.h
) to exclude bins that allow triangular configurations (AC+BD>AB,
You might want to set rmin_long >= 3 * rmax_short
, because then it is guaranteed that AC and BD (