containment_region#

gammapy.maps.containment_region(map_, fraction=0.393, apply_union=True)[source]#
Find the iso-contours region corresponding to a given containment

for a map of integral quantities with a flat geometry.

Parameters:
map_WcsNDMap

Map of integral quantities.

fractionfloat, optional

Containment fraction. Default is 0.393.

apply_unionbool, optional

It True return a compound region otherwise return a list of polygon regions. Default is True. Note that compound regions cannot be written in ds9 format but can always be saved with numpy.savez.

Returns:
regionslist of PolygonSkyRegion or CompoundSkyRegion

Regions from iso-contours matching containment fraction.