hats.pixel_math.healpix_shim#
Attributes#
Functions#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Converts ra and dec to cartesian coordinates on the unit sphere |
|
Get the minimum distance between pixels for a given average size |
|
Get the average size for a given minimum distance between pixels |
|
Get the largest order with average healpix size larger than avg_size_arcmin |
|
Get the largest order for which distance between pixels is less than margin_thr_arcmin |
|
Get the estimated minimum distance between pixels at a given order. |
Module Contents#
- 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