hats.pixel_math.region_to_moc
=============================

.. py:module:: hats.pixel_math.region_to_moc


Functions
---------

.. autoapisummary::

   hats.pixel_math.region_to_moc.wrap_ra_angles
   hats.pixel_math.region_to_moc.pixel_list_to_moc
   hats.pixel_math.region_to_moc.cone_to_moc
   hats.pixel_math.region_to_moc.box_to_moc
   hats.pixel_math.region_to_moc.polygon_to_moc


Module Contents
---------------

.. py:function:: wrap_ra_angles(ra: numpy.ndarray | collections.abc.Iterable | int | float) -> numpy.ndarray

   
   Wraps angles to the [0,360] degree range.


   :Parameters:

       **ra** : ndarray | 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.











   ..
       !! processed by numpydoc !!

.. py:function:: pixel_list_to_moc(pixels: list[hats.pixel_math.HealpixPixel])

   
   Create a MOC representation of the requested pixels.


   :Parameters:

       **pixels** : list[HealpixPixels]
           the pixels to include



   :Returns:

       MOC
           a MOC object that covers the specified pixels











   ..
       !! processed by numpydoc !!

.. py:function:: cone_to_moc(ra: float, dec: float, radius_arcsec: float, max_depth: int)

   
   Create a MOC representation of a cone, at a particular pixel depth.


   :Parameters:

       **ra** : float
           Right ascension of the center of the cone, in degrees

       **dec** : float
           Declination of the center of the cone, in degrees

       **radius_arcsec** : float
           Radius of the cone, in arcseconds

       **max_depth** : int
           highest HEALPix order to use in MOC



   :Returns:

       MOC
           a MOC object that covers the specified cone











   ..
       !! processed by numpydoc !!

.. py:function:: box_to_moc(ra: tuple[float, float], dec: tuple[float, float], max_depth: int)

   
   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:

       **ra** : tuple[float, float]
           Right ascension range, in degrees

       **dec** : tuple[float, float]
           Declination range, in degrees

       **max_depth** : int
           highest HEALPix order to use in MOC



   :Returns:

       MOC
           a MOC object that covers the specified box











   ..
       !! processed by numpydoc !!

.. py:function:: polygon_to_moc(vertices: list[tuple[float, float]], max_depth)

   
   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:

       **vertices** : list[tuple[float, float]]
           The list of vertex coordinates for the polygon, (ra, dec), in degrees.

       **max_depth** : int
           highest HEALPix order to use in MOC



   :Returns:

       MOC
           a MOC object that covers the specified polygon











   ..
       !! processed by numpydoc !!

