MapMaker¶
-
class
gammapy.cube.
MapMaker
(geom, offset_max, geom_true=None, exclusion_mask=None)[source]¶ Bases:
object
Make maps from IACT observations.
Parameters: Methods Summary
run
(observations[, selection])Make maps for a list of observations. run_images
([observations, spectrum, keepdims])Create images by summing over the energy axis. Methods Documentation
-
run
(observations, selection=None)[source]¶ Make maps for a list of observations.
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
Stacked counts, background and exposure maps
- observations :
-
run_images
(observations=None, spectrum=None, keepdims=False)[source]¶ Create images by summing over the energy axis.
Either MapMaker.run() has to be called before calling this function, or observations need to be passed. If MapMaker.run() has been called before, then those maps will be summed over. Else, new maps will be computed and then summed.
Exposure is weighted with an assumed spectrum, resulting in a weighted mean exposure image.
Parameters: - observations :
Observations
Observations to process
- 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
- observations :
-