healpy.pixelfunc.xyf2pix#
- healpy.pixelfunc.xyf2pix(nside, x, y, face, nest=False)#
xyf2pix : nside,x,y,face,nest=False -> ipix (default:RING)
- Parameters:
- nsideint, scalar or array-like
The HEALPix nside parameter, must be a power of 2
- x, yint, scalars or array-like
Pixel indices within face
- faceint, scalars or array-like
Face number
- nestbool, optional
if True, assume NESTED pixel ordering, otherwise, RING pixel ordering
- Returns:
- pixint or array of int
The HEALPix pixel numbers. Scalar if all input are scalar, array otherwise. Usual numpy broadcasting rules apply.
See also
Examples
>>> import healpy as hp >>> hp.xyf2pix(16, 8, 8, 4) 1440
>>> print(hp.xyf2pix(16, [8, 8, 8, 15, 0], [8, 8, 7, 15, 0], [4, 0, 5, 0, 8])) [1440 427 1520 0 3068]