linear_wcs_to_arrays¶
-
gammapy.utils.wcs.
linear_wcs_to_arrays
(wcs, nbins_x, nbins_y)[source]¶ Make a 2D linear binning from a WCS object.
This method gives the correct answer only for linear X, Y binning. The method expects angular quantities in the WCS object. X is identified with WCS axis 1, Y is identified with WCS axis 2. The method needs the number of bins as input, since it is not in the WCS object.
Parameters: - wcs :
WCS
WCS object describing the bin coordinates
- nbins_x : int
number of bins in X coordinate
- nbins_y : int
number of bins in Y coordinate
Returns: - wcs :