cdshealpix.from_ring

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

Convert HEALPix cells from the RING to the NESTED scheme.

Parameters:
ipixnumpy.ndarray

The HEALPix cell indexes in the RING 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_nestednumpy.ndarray

The corresponding HEALPix cells in the NESTED scheme.

Raises:
ValueError

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

Examples

>>> from cdshealpix import from_ring
>>> import numpy as np
>>> ipix = np.array([42, 6, 10])
>>> depth = 12
>>> print(from_ring(ipix, depth))
[16777203 33554430 67108862]