healpix_geo.zuniq.from_nested#
- healpix_geo.zuniq.from_nested(ipix, depth, num_threads=0)#
Convert from nested to zuniq
- Parameters:
ipix (numpy.ndarray) – The HEALPix cell indexes in the nested scheme given as a np.uint64 numpy array.
depth (
intornumpy.ndarrayofint) – The HEALPix cell depth given as scalar or a np.uint8 numpy array.num_threads (
int, 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:
zuniq (
numpy.ndarrayofint) – The cell ids in the zuniq scheme.
Examples
>>> import healpix_geo.zuniq >>> import numpy as np >>> ipix_nested = np.array([32, 125, 45, 91], dtype="uint64") >>> depth = np.array([1, 3, 2, 4], dtype="uint8") >>> ipix_zuniq = healpix_geo.zuniq.from_nested(ipix_nested, depth) >>> ipix_zuniq array([4683743612465315840, 1130403506469994496, 1639310264362860544, 206039682952200192], dtype=uint64)