StackedObsImageMaker

class gammapy.scripts.StackedObsImageMaker(empty_image=None, energy_band=None, offset_band=None, data_store=None, obs_table=None, exclusion_mask=None, ncounts_min=0, save_bkg_scale=True)[source]

Bases: object

Compute stacked images for many observations.

The computed images are stored in a images attribute of type SkyImageList with the following keys:

  • counts : Counts
  • bkg : Background model
  • exposure : Exposure
  • excess : Excess
  • significance : Significance
Parameters:

empty_image : SkyImage

Reference image

energy_band : Energy

Energy band selection

offset_band : astropy.coordinates.Angle

Offset band selection

data_store : DataStore

Data store

obs_table : Table

Required columns: OBS_ID

exclusion_mask : SkyImage

Exclusion mask

ncounts_min : int

Minimum counts required for the observation

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

excess_image() Compute excess between counts and bkg image.
make_images([make_background_image, …]) Compute the counts, bkg, exposure, excess and significance images for a set of observation.
significance_image(radius) Make the significance image from the counts and bkg images.

Methods Documentation

excess_image()[source]

Compute excess between counts and bkg image.

make_images(make_background_image=False, bkg_norm=True, spectral_index=2.3, for_integral_flux=False, radius=10)[source]

Compute the counts, bkg, exposure, excess and significance images for a set of observation.

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

spectral_index : float

Assumed power-law spectral index

for_integral_flux : bool

True if you want that the total excess / exposure gives the integrated flux

radius : float

Disk radius in pixels for the significance image

significance_image(radius)[source]

Make the significance image from the counts and bkg images.

Parameters:

radius : float

Disk radius in pixels.