yaw.correlation.estimators#

This module implements the correlation estimators and a way to symbolically represent paircounts (e.g. data-data counts are represented by CtsDD).

The latter is used in CorrFunc to determine which correlation estimator can be computed for a possibly incomplete set of pair counts (e.g. only data-data and random-random). Their key property is that they can be compared, e.g.

>>> CtsDR() == CtsRR()  # random-data is random-random?
False

A special case is the DavisPeebles Estimator, which is the ratio \(DD/DR-1\). In the case of a crosscorrelation it is irrelevant which of the samples provides a random sample. Therefore, there is the special class CtsMix, with the property:

>>> CtsMix() == CtsDR()
True
>>> CtsMix() == CtsRD()
True

Functions

cts_from_code(code)

Instantiate the correct Cts subclass from a string.

Classes

PeeblesHauser()

Implementation of the Peebles-Hauser correlation estimator \(\frac{DD}{RR} - 1\).

DavisPeebles()

Implementation of the Davis-Peebles correlation estimator \(\frac{DD}{DR} - 1\).

Hamilton()

Implementation of the Hamilton correlation estimator \(\frac{DD \times RR}{DR \times RD} - 1\).

LandySzalay()

Implementation of the Landy-Szalay correlation estimator \(\frac{DD - (DR + RD)}{RR} + 1\).