pair_correlation

gammapy.utils.coordinates.pair_correlation(lon, lat, theta_bins)[source]

Compute pair correlation function for points on the sphere.

Parameters:
lon, lat : array_like

Coordinate arrays

theta_bins : array_like

Array defining the theta binning. theta is the angular offset between positions.

unit : {‘deg’, ‘rad’}

Units of input and output coordinates

Returns:
counts : array

Array of point separations per theta bin.