Background#

as a function of reconstructed energy and detector coordinates (BKG_3D)#

The Background3D class represents a background rate per solid angle as a function of reconstructed energy and detector coordinates

Its format specifications are available in BKG_3D.

This is the format in which IACT DL3 background rates are usually provided, as an example:

"""Plot the background rate from the HESS DL3 data release 1."""
import matplotlib.pyplot as plt
from gammapy.irf import Background3D

filename = "$GAMMAPY_DATA/hess-dl3-dr1/data/hess_dl3_dr1_obs_id_020136.fits.gz"
bkg = Background3D.read(filename, hdu="BKG")
bkg.peek()
plt.show()

(png, hires.png, pdf)

../../_images/plot_bkg_3d.png

as a function of reconstructed energy and offset angle, radially symmetric (BKG_2D)#

The Background2D class represents a background rate per solid angle as a function reconstructed energy and offset angle from the field of view center.

Its format specifications are available in BKG_2D.

You can produce a radially-symmetric background from a list of DL3 observations devoid of gamma-ray signal using the tutorial in background_model.html