healpy.pixelfunc.pix2xyf

Contents

healpy.pixelfunc.pix2xyf#

healpy.pixelfunc.pix2xyf(nside, ipix, nest=False)#

pix2xyf : nside,ipix,nest=False -> x,y,face (default RING)

Parameters:
nsideint or array-like

The HEALPix nside parameter, must be a power of 2

ipixint or array-like

Pixel indices

nestbool, optional

if True, assume NESTED pixel ordering, otherwise, RING pixel ordering

Returns:
x, yint, scalars or array-like

Pixel indices within face

faceint, scalars or array-like

Face number

See also

xyf2pix

Examples

>>> import healpy as hp
>>> hp.pix2xyf(16, 1440)
(8, 8, 4)
>>> hp.pix2xyf(16, [1440,  427, 1520,    0, 3068])
(array([ 8,  8,  8, 15,  0]), array([ 8,  8,  7, 15,  0]), array([4, 0, 5, 0, 8]))
>>> hp.pix2xyf([1, 2, 4, 8], 11)
(array([0, 1, 3, 7]), array([0, 0, 2, 6]), array([11,  3,  3,  3]))