hats.pixel_math.healpix_pixel#
Attributes#
Classes#
A HEALPix pixel, represented by an order and pixel number in NESTED ordering scheme |
Functions#
|
Returns the pixel number at a lower order |
|
Returns the pixel numbers at a higher order |
Module Contents#
- class HealpixPixel[source]#
A HEALPix pixel, represented by an order and pixel number in NESTED ordering scheme
see https://lambda.gsfc.nasa.gov/toolbox/pixelcoords.html for more information
- convert_to_lower_order(delta_order: int) HealpixPixel[source]#
Returns the HEALPix pixel that contains the pixel at a lower order
- Parameters:
- delta_orderint
the difference in order to be subtracted from the current order to generate the pixel at a lower order. Must be non-negative
- Returns:
- HealpixPixel
A new HealpixPixel at the current order - delta_order which contains the current pixel
- Raises:
- ValueError
If delta_order is greater than the current order, a pixel cannot be generated at a negative order. Or if delta_order is negative
- convert_to_higher_order(delta_order: int) list[HealpixPixel][source]#
Returns a list of HEALPix pixels making up the current pixel at a higher order
- Parameters:
- delta_orderint
the difference in order to be added to the current order to generate the pixels at a higher order. Must be non-negative
- Returns:
- list[HealpixPixel]
A new HealpixPixel at the current order - delta_order which contains the current pixel
- Raises:
- ValueError
If delta_order + current order is greater than the maximum HEALPix order, pixels cannot be generated. Or if delta_order is negative
- property dir: int[source]#
Directory number for the pixel.
This is necessary for file systems that limit to 10,000 subdirectories. The directory name will take the HiPS standard form of:
<catalog_base_dir>/Norder=<pixel_order>/Dir=<directory number>
Where the directory number is calculated using integer division as:
(pixel_number/10000)*10000
- get_lower_order_pixel(order: int, pixel: int, delta_order: int) int[source]#
Returns the pixel number at a lower order
- Parameters:
- orderint
the order of the pixel
- pixelint
the pixel number of the pixel in NESTED ordering
- delta_orderint
the change in order to the new lower order
- Returns:
- int
The pixel number at order (order - delta_order) for the pixel that contains the given pixel
- get_higher_order_pixels(order: int, pixel: int, delta_order: int) numpy.ndarray[source]#
Returns the pixel numbers at a higher order
- Parameters:
- orderint
the order of the pixel
- pixelint
the pixel number of the pixel in NESTED ordering
- delta_orderint
the change in order to the new higher order
- Returns:
- np.ndarray
The list of pixel numbers at order (order + delta_order) for the pixels contained by the given pixel