hats#

High-level namespace, hats

Submodules#

Classes#

HealpixPixel

A HEALPix pixel, represented by an order and pixel number in NESTED ordering scheme

Package 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

order: int#

HEALPix order

pixel: int#

HEALPix pixel number in NESTED ordering scheme

__post_init__() None[source]#

Initialize a HEALPix pixel

__str__() str[source]#
__repr__()[source]#
__getitem__(key: int) int[source]#
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#

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