uvex_transients.surveys.footprints.utils.convert_region_to_MOC#
- uvex_transients.surveys.footprints.utils.convert_region_to_MOC(regions: Regions, max_order: int, point_region_size: float | None = None) MOC[source]#
Convert parsed DS9 regions into a single ~mocpy.MOC.
Circles and polygons convert directly. A ~regions.PointSkyRegion is a pointing, not an area, so it is first expanded into a circle of radius point_region_size.
- Parameters:
regions (
regions.Regions) – Parsed region file contents, e.g.Regions.read(path, format="ds9").max_order (
int) – MOC resolution (HEALPix order; order 10 is ~3.4 arcmin cells).point_region_size (
float, optional) – Radius, in degrees, used to expand point regions. Required if regions contains any.
- Returns:
The union of every region’s MOC.
- Return type:
mocpy.MOC- Raises:
ValueError – If regions is empty, or has a point region and point_region_size is None.
TypeError – If a region is not a circle, polygon, or point.