cdshealpix.to_ring

cdshealpix.to_ring(ipix, depth, num_threads=0)

Convert HEALPix cells from the NESTED to the RING scheme.

Parameters:
ipixnumpy.ndarray

The HEALPix cell indexes in the NESTED scheme.

depthint

The depth of the HEALPix cells.

num_threadsint, optional

Specifies the number of threads to use for the computation. Default to 0 means it will choose the number of threads based on the RAYON_NUM_THREADS environment variable (if set), or the number of logical CPUs (otherwise)

Returns:
ipix_ringnumpy.ndarray

The corresponding HEALPix cells in the RING scheme.

Raises:
ValueError

When the HEALPix cell indexes given have values out of \([0, 4^{29 - depth}[\).

Examples

>>> from cdshealpix import to_ring
>>> import numpy as np
>>> ipix = np.array([42, 6, 10])
>>> depth = 12
>>> print(to_ring(ipix, depth))
[100526076 100591616 100591614]