minimum_separation

gammapy.utils.coordinates.minimum_separation(lon1, lat1, lon2, lat2)[source]

Compute minimum distance of each (lon1, lat1) to any (lon2, lat2).

Parameters:

lon1, lat1 : array_like

Primary coordinates of interest

lon2, lat2 : array_like

Counterpart coordinate array

unit : {‘deg’, ‘rad’}

Units of input and output coordinates

Returns:

theta_min : array

Minimum distance