lon_lat_rectangle_mask

gammapy.image.lon_lat_rectangle_mask(lons, lats, lon_min=None, lon_max=None, lat_min=None, lat_max=None)[source]

Produces a rectangular boolean mask array based on lat and lon limits.

Parameters:

lons : ndarray

Array of longitude values.

lats : ndarray

Array of latitude values.

lon_min : float, optional

Minimum longitude of rectangular mask.

lon_max : float, optional

Maximum longitude of rectangular mask.

lat_min : float, optional

Minimum latitude of rectangular mask.

lat_max : float, optional

Maximum latitude of rectangular mask.

Returns:

mask : ndarray

Boolean mask array for a rectangular sub-region defined by specified maxima and minima lon and lat.