make_grid_rectangle_sky_regions#

gammapy.utils.regions.make_grid_rectangle_sky_regions(center, width, height, wcs, nbinx=1, nbiny=1, angle=<Quantity 0. deg>)[source]#

Utility to return a list of 2D grid of rectangular projections

This function to create a 2D grid of RectangleSkyRegion tiles on the projection plane defined by the input WCS. This is similar to make_orthogonal_rectangle_sky_regions but covers a 2-D field instead of a 1-D profile

Parameters:
centerSkyCoord

Center coordinate of the full grid.

widthQuantity

Total angular width of the grid (longitude direction).

heightQuantity

Total angular height of the grid (latitude direction).

wcsWCS

WCS projection object used to convert between sky and pixel coordinates.

nbinxint, optional

Number of boxes along x-axis (RA/longitude). Default is 1.

nbinyint, optional

Number of boxes along y-axis (Dec/latitude). Default is 1.

angleQuantity, optional

Rotation angle (in deg) of the grid, anti-clockwise. Default is 0 deg.

Returns:
regionsRegions

list of RectangleSkyRegion