hats.pixel_math.healpix_shim#

Attributes#

Functions#

is_order_valid(→ bool)

npix2order(→ int)

order2nside(→ int)

order2npix(→ int)

order2resol(→ float)

order2pixarea(→ float)

radec2pix(→ numpy.ndarray[numpy.int64])

ang2vec(→ numpy.ndarray)

Converts ra and dec to cartesian coordinates on the unit sphere

avgsize2mindist(→ numpy.ndarray)

Get the minimum distance between pixels for a given average size

mindist2avgsize(→ numpy.ndarray)

Get the average size for a given minimum distance between pixels

avgsize2order(→ numpy.ndarray)

Get the largest order with average healpix size larger than avg_size_arcmin

margin2order(→ numpy.ndarray)

Get the largest order for which distance between pixels is less than margin_thr_arcmin

order2mindist(→ numpy.ndarray | float)

Get the estimated minimum distance between pixels at a given order.

Module Contents#

MAX_HEALPIX_ORDER = 29[source]#
is_order_valid(order: int) bool[source]#
npix2order(npix: int) int[source]#
order2nside(order: int) int[source]#
order2npix(order: int) int[source]#
order2resol(order: int, *, arcmin: bool = False, unit=u.rad) float[source]#
order2pixarea(order: int, *, degrees: bool = False, unit=u.sr) float[source]#
radec2pix(order: int, ra: float, dec: float) numpy.ndarray[numpy.int64][source]#
ang2vec(ra, dec, **kwargs) numpy.ndarray[source]#

Converts ra and dec to cartesian coordinates on the unit sphere

avgsize2mindist(avg_size: numpy.ndarray) numpy.ndarray[source]#

Get the minimum distance between pixels for a given average size

We don’t have the precise geometry of the healpix grid yet, so we are using average_size / mininimum_distance = 1.6 as a rough estimate.

Parameters:

avg_size (np.ndarray of float) – The average size of a healpix pixel

Returns:

The minimum distance between pixels for the given average size

Return type:

np.ndarray of float

mindist2avgsize(mindist: numpy.ndarray) numpy.ndarray[source]#

Get the average size for a given minimum distance between pixels

We don’t have the precise geometry of the healpix grid yet, so we are using average_size / mininimum_distance = 1.6 as a rough estimate.

Parameters:

mindist (np.ndarray of float) – The minimum distance between pixels

Returns:

The average size of a healpix pixel for the given minimum distance between pixels.

Return type:

np.ndarray of float

avgsize2order(avg_size_arcmin: numpy.ndarray) numpy.ndarray[source]#

Get the largest order with average healpix size larger than avg_size_arcmin

Parameters:

avg_size_arcmin (np.ndarray of float) – The average size of a healpix pixel in arcminutes

Returns:

The largest healpix order for which the average size is larger than avg_size_arcmin

Return type:

np.ndarray of int

margin2order(margin_thr_arcmin: numpy.ndarray) numpy.ndarray[source]#

Get the largest order for which distance between pixels is less than margin_thr_arcmin

We don’t have the precise geometry of the healpix grid yet, we are using average_size / mininimum_distance = 1.6 as a rough estimate.

Parameters:

margin_thr_arcmin (np.ndarray of float) – The minimum distance between pixels in arcminutes

Returns:

The largest healpix order for which the distance between pixels is less than margin_thr_arcmin

Return type:

np.ndarray of int

order2mindist(order: numpy.ndarray | int) numpy.ndarray | float[source]#

Get the estimated minimum distance between pixels at a given order.

We don’t have the precise geometry of the healpix grid yet, we are using average_size / mininimum_distance = 1.6 as a rough estimate.

Parameters:

order (np.ndarray of int or a single scalar int) – The healpix order

Returns:

The minimum distance between pixels in arcminutes

Return type:

np.ndarray of float or a single scalar float