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.2. astroML.correlation.two_point_angular

astroML.correlation.two_point_angular(ra, dec, bins, method='standard', random_state=None)[source]

Angular two-point correlation function

A separate function is needed because angular distances are not euclidean, and random sampling needs to take into account the spherical volume element.

Parameters :

ra : array_like

input right ascention, shape = (n_samples,)

dec : array_like

input declination

bins : array_like

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

method : string

“standard” or “landy-szalay”.

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