ReflectedRegionsFinder#

class gammapy.makers.ReflectedRegionsFinder(angle_increment='0.1 rad', min_distance='0 rad', min_distance_input='0.1 rad', max_region_number=10000, binsz='0.01 deg')[source]#

Bases: RegionsFinder

Find reflected regions.

This class is responsible for placing a reflected region for a given input region and pointing position. It converts to pixel coordinates internally assuming a tangent projection at center position.

If the center lies inside the input region, no reflected regions can be found.

If you want to make a background estimate for an IACT observation using the reflected regions method, see also ReflectedRegionsBackgroundMaker.

Parameters:
angle_incrementAngle, optional

Rotation angle applied when a region falls in an excluded region.

min_distanceAngle, optional

Minimum rotation angle between two consecutive reflected regions.

min_distance_inputAngle, optional

Minimum rotation angle between the input region and the first reflected region.

max_region_numberint, optional

Maximum number of regions to use.

binszAngle

Bin size of the reference map used for region finding.

Examples

>>> from astropy.coordinates import SkyCoord, Angle
>>> from regions import CircleSkyRegion
>>> from gammapy.makers import ReflectedRegionsFinder
>>> pointing = SkyCoord(83.2, 22.7, unit='deg', frame='icrs')
>>> target_position = SkyCoord(80.2, 23.5, unit='deg', frame='icrs')
>>> theta = Angle(0.4, 'deg')
>>> on_region = CircleSkyRegion(target_position, theta)
>>> finder = ReflectedRegionsFinder(min_distance_input='1 rad')
>>> regions, wcs = finder.run(region=on_region, center=pointing)
>>> print(regions[0]) 
Region: CircleSkyRegion
center: <SkyCoord (ICRS): (ra, dec) in deg
    (83.19879005, 25.57300957)>
radius: 1438.3... arcsec

Create a new RegionFinder.

Methods Summary

run(region, center[, exclusion_mask])

Find reflected regions.

Methods Documentation

run(region, center, exclusion_mask=None)[source]#

Find reflected regions.

Parameters:
regionSkyRegion

Region to rotate.

centerSkyCoord

Rotation point.

exclusion_maskWcsNDMap, optional

Exclusion mask. Regions intersecting with this mask will not be included in the returned regions. Default is None.

Returns:
regionslist of SkyRegion

Reflected regions.

wcsWCS

WCS for the determined regions.