cdshealpix.to_ring¶
- cdshealpix.to_ring(ipix, depth, num_threads=0)¶
Convert HEALPix cells from the NESTED to the RING scheme.
- Parameters:
- ipix
numpy.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)
- ipix
- Returns:
- ipix_ring
numpy.ndarray
The corresponding HEALPix cells in the RING scheme.
- ipix_ring
- 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]