make_pixel_region¶
-
gammapy.utils.regions.
make_pixel_region
(region, wcs=None)[source]¶ Make pixel region object (
regions.PixelRegion
).See also:
gammapy.utils.regions.make_region
Parameters: - region :
regions.Region
or str Region object or DS9 string representation
- wcs :
astropy.wcs.WCS
WCS
Examples
>>> from gammapy.maps import WcsGeom >>> from gammapy.utils.regions import make_pixel_region >>> wcs = WcsGeom.create().wcs >>> region = make_pixel_region("galactic;circle(10,20,3)", wcs) >>> region <CirclePixelRegion(PixCoord(x=570.9301128316974, y=159.935542455567), radius=6.061376992149382)>
- region :