healpix_geo.nested.angular_distances#

healpix_geo.nested.angular_distances(from_, to_, depth, num_threads=0)#

Compute the angular distances between cell centers

Parameters:
  • from_ (numpy.ndarray) – The source Healpix cell indexes given as a np.uint64 numpy array. Should be 1D.

  • to_ (numpy.ndarray) – The destination Healpix cell indexes given as a np.uint64 numpy array. Should be 2D.

  • depth (int) – The depth of the Healpix cells.

  • num_threads (int, default: 0) – 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:

distances (numpy.ndarray) – The angular distances in radians.

Raises:

ValueError – When the Healpix cell indexes given have values out of \([0, 4^{depth}[\).