healpy.pixelfunc.ring2nest

healpy.pixelfunc.ring2nest(nside, ipix)

Convert pixel number from RING ordering to NESTED ordering.

Parameters:

nside : int, scalar or array-like

the healpix nside parameter

ipix : int, scalar or array-like

the pixel number in RING scheme

Returns:

ipix : int, scalar or array-like

the pixel number in NESTED scheme

See also

nest2ring, reorder

Examples

>>> import healpy as hp
>>> hp.ring2nest(16, 1504)
1130
>>> hp.ring2nest(2, np.arange(10))
array([ 3,  7, 11, 15,  2,  1,  6,  5, 10,  9])
>>> hp.ring2nest([1, 2, 4, 8], 11)
array([ 11,  13,  61, 253])