MapMaker

class gammapy.cube.MapMaker(geom, offset_max, geom_true=None, exclusion_mask=None)[source]

Bases: object

Make maps from IACT observations.

Parameters:
geom : WcsGeom

Reference image geometry in reco energy

offset_max : Angle

Maximum offset angle

geom_true : WcsGeom
Reference image geometry in true energy, used for exposure maps and PSF.

If none, the same as geom is assumed

exclusion_mask : Map

Exclusion mask

Methods Summary

make_images([spectrum, keepdims]) Create images by summing over the energy axis.
run(observations[, selection]) Run MapMaker for a list of observations to create stacked counts, exposure and background maps

Methods Documentation

make_images(spectrum=None, keepdims=False)[source]

Create images by summing over the energy axis.

Exposure is weighted with an assumed spectrum, resulting in a weighted mean exposure image.

Parameters:
spectrum : SpectralModel

Spectral model to compute the weights. Default is power-law with spectral index of 2.

keepdims : bool, optional

If this is set to True, the energy axes is kept with a single bin. If False, the energy axes is removed

Returns:
images : dict of Map
run(observations, selection=None)[source]

Run MapMaker for a list of observations to create stacked counts, exposure and background maps

Parameters:
observations : Observations

Observations to process

selection : list

List of str, selecting which maps to make. Available: ‘counts’, ‘exposure’, ‘background’ By default, all maps are made.

Returns:
maps: dict of stacked counts, background and exposure maps.