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

Containment fraction. Default is 0.393.

apply_unionbool

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 ~regions.PolygonSkyRegion` or CompoundSkyRegion

regions from iso-contours matching containment fraction.