make_background_cube

gammapy.cube.make_background_cube(pointing, obstime, bkg, ref_cube, offset_max)[source]

Calculate background predicted counts cube.

This function evaluates the background rate model on a sky cube, and then multiplies with the cube bin size, computed via gammapy.cube.SkyCube.bin_size, resulting in a cube with values that contain predicted background counts per bin.

Note that this method isn’t very precise if the energy bins are large. In that case you might consider implementing a more precise method that integrates over energy (e.g. by choosing a finer energy binning here and then to group energy bins).

Parameters:

pointing : SkyCoord

Pointing direction

obstime : Quantity

Observation time

bkg : Background3D

Background rate model

ref_cube : SkyCube

Reference cube used to define geometry

offset_max : Angle

Maximum field of view offset.

Returns:

background : SkyCube

Background predicted counts sky cube