hats.pixel_math.healpix_pixel_function#
Functions#
|
Perform an indirect sort of a list of HealpixPixels. |
|
Perform an sort of a list of HealpixPixels. |
|
Computes an array of HEALPix [order, pixel] for an array of intervals |
Module Contents#
- get_pixel_argsort(pixels: list[hats.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 _healpix_29.
- Parameters:
pixels (List[HealpixPixel]) – array to sort
- Returns:
array of indices that sort the pixels in breadth-first order.
- sort_pixels(pixels: list[hats.pixel_math.healpix_pixel.HealpixPixel])[source]#
Perform an 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 _healpix_29.
- Parameters:
pixels (List[HealpixPixel]) – array to sort
- Returns:
pixels sorted 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.