StackedObsCubeMaker

class gammapy.cube.StackedObsCubeMaker(empty_cube_images, empty_exposure_cube=None, offset_band=None, data_store=None, obs_table=None, exclusion_mask=None, save_bkg_scale=True)[source]

Bases: object

Compute stacked cubes for many observations.

The computed cubes are stored in a SkyCube with the following name:

  • counts_cube : Counts
  • bkg_cube : Background model
  • exposure_cube : Exposure
  • excess_cube : Excess
  • significance_cube : Significance
Parameters:

empty_cube_images : SkyCube

Reference Cube for images in reco energy

empty_exposure_cube : SkyCube

Reference Cube for exposure in true energy

offset_band : astropy.coordinates.Angle

Offset band selection of the events to fill the cubes

data_store : DataStore

Data store

obs_table : Table

Required columns: OBS_ID

exclusion_mask : SkyCube

Exclusion mask

save_bkg_scale : bool

True if you want to save the normalisation of the bkg for each run in a table table_bkg_norm with two columns: “OBS_ID” and “bkg_scale”

Methods Summary

make_cubes([make_background_image, …]) Compute all cubes for a given set of observation.
make_excess_cube() Compute excess cube between counts and bkg cube.
make_mean_psf_cube(ref_cube[, spectral_index]) Compute the mean PSF for a set of observation for different energy bands.
make_significance_cube(radius) Make the significance cube from the counts and bkg cubes.

Methods Documentation

make_cubes(make_background_image=False, bkg_norm=True, radius=10)[source]

Compute all cubes for a given set of observation.

Cubes computed: total counts, bkg, exposure, excess, significance.

Parameters:

make_background_image : bool

True if you want to compute the background and exposure images

bkg_norm : bool

If true, apply the scaling factor to the bkg image

radius : float

Disk radius in pixels for the significance image

make_excess_cube()[source]

Compute excess cube between counts and bkg cube.

make_mean_psf_cube(ref_cube, spectral_index=2.3)[source]

Compute the mean PSF for a set of observation for different energy bands.

Parameters:

ref_cube : SkyCube

Reference sky cube to evaluate PSF on.

spectral_index : float

Assumed spectral index to compute mean PSF in energy band.

Returns:

ref_cube : SkyCube

PSF mean cube

make_significance_cube(radius)[source]

Make the significance cube from the counts and bkg cubes.

Parameters:

radius : float

Disk radius in pixels.