makeBoxWcsRegion

lsst.daf.butler.makeBoxWcsRegion(box, wcs, margin)

Construct a spherical ConvexPolygon from a WCS and a bounding box.

Parameters:
box : lsst.afw.geom.Box2I or lsst.afw.geom.Box2D

A box in the pixel coordinate system defined by the WCS.

wcs : lsst.afw.image.Wcs

A mapping from a pixel coordinate system to the sky.

margin : float

A buffer in pixels to grow the box by (in all directions) before transforming it to sky coordinates.

Returns:
polygon : lsst.sphgeom.ConvexPolygon

A convex polygon.