hipscat.pixel_math.healpix_pixel_function

hipscat.pixel_math.healpix_pixel_function#

Module Contents#

Functions#

get_pixel_argsort(pixels)

Perform an indirect sort of a list of HealpixPixels.

get_pixels_from_intervals(→ numpy.ndarray)

Computes an array of HEALPix [order, pixel] for an array of intervals

get_pixel_argsort(pixels: List[hipscat.pixel_math.healpix_pixel.HealpixPixel])[source]#

Perform an indirect sort of a list of HealpixPixels.

This will order the pixels according to a breadth-first traversal of the healpix pixel hierarchy, not merely by increasing order by Norder/Npix (depth-first ordering). This is similar to ordering fully by _hipscat_index.

Parameters:

pixels (List[HealpixPixel]) – array to sort

Returns:

array of indices that sort the pixels in breadth-first order.

get_pixels_from_intervals(intervals: numpy.ndarray, tree_order: int) numpy.ndarray[source]#

Computes an array of HEALPix [order, pixel] for an array of intervals

Parameters:
  • intervals (np.ndarray) – Array of intervals of the start and end pixel numbers of HEALPix pixels. Must be NESTED numbering scheme.

  • tree_order (int) – The order of the pixel numbers in the interval array

Returns (np.ndarray):

An array of [order, pixel] in NESTED numbering scheme for each interval in the array.