How to use the pyregion.ds9_region_parser.RegionParser.sky_to_image function in pyregion

To help you get started, we’ve selected a few pyregion examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github astropy / pyregion / pyregion / core.py View on Github external
header : `~astropy.io.fits.Header`
            FITS header

        Returns
        -------
        shape_list : `ShapeList`
            New shape list, with coordinates of the each shape
            converted to the image coordinate using the given header
            information.
        """

        comment_list = self._comment_list
        if comment_list is None:
            comment_list = cycle([None])

        r = RegionParser.sky_to_image(zip(self, comment_list),
                                      header)
        shape_list, comment_list = zip(*list(r))
        return ShapeList(shape_list, comment_list=comment_list)