ReflectedRegionsBackgroundEstimator

class gammapy.background.ReflectedRegionsBackgroundEstimator(on_region, observations, binsz=<Quantity 0.01 deg>, **kwargs)[source]

Bases: object

Reflected Regions background estimator.

This class is responsible for creating a BackgroundEstimate by placing reflected regions given a target region and an observation.

For a usage example see spectrum_analysis.html

Parameters:
on_region : SkyRegion

Target region with any shape, except PolygonSkyRegion

observations : Observations

Observations to process

binsz : Angle

Optional, bin size of the maps used to compute the regions, Default ‘0.01 deg’

kwargs : dict

Forwarded to ReflectedRegionsFinder

Methods Summary

plot(self[, fig, ax, cmap, idx, add_legend]) Standard debug plot.
process(self, obs) Estimate background for one observation.
run(self) Run all steps.

Methods Documentation

plot(self, fig=None, ax=None, cmap=None, idx=None, add_legend=False)[source]

Standard debug plot.

Parameters:
fig : Figure

Top level container of the figure

ax : Axes

Axes of the figure

cmap : ListedColormap, optional

Color map to use

idx : int, optional

Observations to include in the plot, default: all

add_legend : boolean, optional

Enable/disable legend in the plot, default: False

process(self, obs)[source]

Estimate background for one observation.

run(self)[source]

Run all steps.