Return the 4 nearest pixels and corresponding weights.
Parameters : | nside : int
theta, phi : float, scalar or array-like
nest : bool
|
---|---|
Returns : | res : tuple of length 2
|
See also
Examples
>>> import healpy as hp
>>> hp.get_neighbours(1, 0)
(array([0, 1, 4, 5]), array([ 1., 0., 0., 0.]))
>>> hp.get_neighbours(1, 0, 0)
(array([1, 2, 3, 0]), array([ 0.25, 0.25, 0.25, 0.25]))
>>> hp.get_neighbours(1, [0, np.pi/2], 0)
(array([[ 1, 4],
[ 2, 5],
[ 3, 11],
[ 0, 8]]), array([[ 0.25, 1. ],
[ 0.25, 0. ],
[ 0.25, 0. ],
[ 0.25, 0. ]]))