healpy.rotator.angdist

healpy.rotator.angdist(dir1, dir2, lonlat=False)

Returns the angular distance between dir1 and dir2.

Parameters:
dir1, dir2float, array-like

The directions between which computing the angular distance. Angular if len(dir) == 2 or vector if len(dir) == 3. See lonlat for unit

lonlatbool, scalar or sequence

If True, angles are assumed to be longitude and latitude in degree, otherwise they are interpreted as colatitude and longitude in radian. If a sequence, lonlat[0] applies to dir1 and lonlat[1] applies to dir2.

Returns:
anglesfloat, scalar or array-like

The angle(s) between dir1 and dir2 in radian.

Examples

>>> import healpy as hp
>>> hp.rotator.angdist([.2,0], [.2, 1e-6])
array([  1.98669331e-07])