This documentation is for astroML version 0.2

This page


astroML Mailing List

GitHub Issue Tracker


Scipy 2012 (15 minute talk)

Scipy 2013 (20 minute talk)


If you use the software, please consider citing astroML.

11.8.1. astroML.correlation.two_point

astroML.correlation.two_point(data, bins, method='standard', data_R=None, random_state=None)[source]

Two-point correlation function

Parameters :

data : array_like

input data, shape = [n_samples, n_features]

bins : array_like

bins within which to compute the 2-point correlation. shape = Nbins + 1

method : string

“standard” or “landy-szalay”.

data_R : array_like (optional)

if specified, use this as the random comparison sample

random_state : integer, np.random.RandomState, or None

specify the random state to use for generating background

Returns :

corr : ndarray

the estimate of the correlation function within each bin shape = Nbins