hats.pixel_math.region_to_moc#
Functions#
|
Wraps angles to the [0,360] degree range. |
|
Create a MOC representation of the requested pixels. |
|
Create a MOC representation of a cone, at a particular pixel depth. |
|
Create a MOC representation of a box, at a particular pixel depth. |
|
Create a MOC representation of a polygon, at a particular pixel depth. |
Module Contents#
- wrap_ra_angles(ra: numpy.ndarray | collections.abc.Iterable | int | float) numpy.ndarray[source]#
Wraps angles to the [0,360] degree range.
- Parameters:
- randarray | Iterable | int | float
Right ascension values, in degrees
- Returns:
- np.ndarray
A numpy array of right ascension values, wrapped to the [0,360] degree range.
- pixel_list_to_moc(pixels: list[hats.pixel_math.HealpixPixel])[source]#
Create a MOC representation of the requested pixels.
- Parameters:
- pixelslist[HealpixPixels]
the pixels to include
- Returns:
- MOC
a MOC object that covers the specified pixels
- cone_to_moc(ra: float, dec: float, radius_arcsec: float, max_depth: int)[source]#
Create a MOC representation of a cone, at a particular pixel depth.
- Parameters:
- rafloat
Right ascension of the center of the cone, in degrees
- decfloat
Declination of the center of the cone, in degrees
- radius_arcsecfloat
Radius of the cone, in arcseconds
- max_depthint
highest HEALPix order to use in MOC
- Returns:
- MOC
a MOC object that covers the specified cone
- box_to_moc(ra: tuple[float, float], dec: tuple[float, float], max_depth: int)[source]#
Create a MOC representation of a box, at a particular pixel depth.
The right ascension edges follow great arc circles and the declination edges follow small arc circles.
- Parameters:
- ratuple[float, float]
Right ascension range, in degrees
- dectuple[float, float]
Declination range, in degrees
- max_depthint
highest HEALPix order to use in MOC
- Returns:
- MOC
a MOC object that covers the specified box
- polygon_to_moc(vertices: list[tuple[float, float]], max_depth)[source]#
Create a MOC representation of a polygon, at a particular pixel depth.
The right ascension edges follow great arc circles and the declination edges follow small arc circles.
- Parameters:
- verticeslist[tuple[float, float]]
The list of vertex coordinates for the polygon, (ra, dec), in degrees.
- max_depthint
highest HEALPix order to use in MOC
- Returns:
- MOC
a MOC object that covers the specified polygon