Note

You are not reading the most up to date version of Gammapy documentation.
Access the latest stable version v1.3 or the list of Gammapy releases.

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.