Make an on-sky polygon from a bbox and a SkyWcs
Parameters
----------
bbox : `lsst.geom.Box2I` or `lsst.geom.Box2D`
Bounding box of region, in pixel coordinates
wcs : `lsst.afw.geom.SkyWcs`
Celestial WCS
Returns
-------
polygon : `lsst.sphgeom.ConvexPolygon`
On-sky region
Definition at line 29 of file patchInfo.py.
30 """Make an on-sky polygon from a bbox and a SkyWcs
34 bbox : `lsst.geom.Box2I` or `lsst.geom.Box2D`
35 Bounding box of region, in pixel coordinates
36 wcs : `lsst.afw.geom.SkyWcs`
41 polygon : `lsst.sphgeom.ConvexPolygon`
44 pixelPoints = Box2D(bbox).getCorners()
45 skyPoints = wcs.pixelToSky(pixelPoints)
46 return ConvexPolygon.convexHull([sp.getVector()
for sp
in skyPoints])