pixel_polygon_mask¶
- grizli.utils.pixel_polygon_mask(polygon, shape, wcs=None)[source]¶
Make a mask points in a 2D array inside a polygon
- Parameters
- polygonstr, (2,M) array
Something that
grizli.utils.SRegion
can parse as a polygon- shapetuple
2-tuple of image dimensions
- wcs
astropy.wcs.WCS
If specified, assume
polygon
is sky coordinates and transform to image.
- Returns
- maskarray
bool
array withshape
that isTrue
insidepolygon