healpy.pixelfunc.reorder

healpy.pixelfunc.reorder(map_in, inp=None, out=None, r2n=None, n2r=None)

Reorder an healpix map from RING/NESTED ordering to NESTED/RING

Parameters :

map_in : array-like

the input map to reorder

inp, out : 'RING' or 'NESTED'

define the input and output ordering

r2n : bool

if True, reorder from RING to NESTED

n2r : bool

if True, reorder from NESTED to RING

Returns :

map_out : array-like

the reordered map

See also

nest2ring, ring2nest

Notes

if r2n or n2r is defined, override inp and out.

Examples

>>> import healpy as hp
>>> hp.reorder(np.arange(48), r2n = True)
array([13,  5,  4,  0, 15,  7,  6,  1, 17,  9,  8,  2, 19, 11, 10,  3, 28,
       20, 27, 12, 30, 22, 21, 14, 32, 24, 23, 16, 34, 26, 25, 18, 44, 37,
       36, 29, 45, 39, 38, 31, 46, 41, 40, 33, 47, 43, 42, 35])
>>> hp.reorder(range(12), n2r = True)
array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11])

Project Versions

Previous topic

healpy.pixelfunc.ring2nest

Next topic

healpy.pixelfunc.nside2npix

This Page