FermiLATBasicImageEstimator¶
-
class
gammapy.image.
FermiLATBasicImageEstimator
(reference, emin, emax, spectral_model=None)[source]¶ Bases:
gammapy.image.basic.BasicImageEstimator
Estimate basic sky images for Fermi-LAT data.
Can compute the following images: counts, exposure, background
TODO: allow different background estimation methods TODO: add examples
Parameters: reference :
SkyImage
Reference sky image.
emin :
Quantity
Lower bound of energy range.
emax :
Quantity
Upper bound of energy range.
spectral_model :
SpectralModel
Spectral model assumption to compute mean exposure and psf images.
Examples
This example shows how to compute a set of basic images for the galactic center region using a prepared 2FHL dataset:
from astropy import unit as u from gammapy.image import SkyImage, FermiLATBasicImageEstimator from gammapy.datasets import FermiLATDataset kwargs = {} kwargs['reference'] = SkyImage.empty(nxpix=201, nypix=101, binsz=0.05) kwargs['emin'] = 50 * u.GeV kwargs['emax'] = 3000 * u.GeV image_estimator = FermiLATBasicImageEstimator(**kwargs) filename = '$FERMI_LAT_DATA/2fhl/fermi_2fhl_data_config.yaml' dataset = FermiLATDataset(filename) result = image_estimator.run(dataset) result['counts'].show()
Methods Summary
background
(dataset)Estimate predicted counts background image in energy band. counts
(dataset)Estimate counts image in energy band. exposure
(dataset)Estimate a spectral model weighted exposure image from an exposure cube. run
(dataset[, which])Estimate sky images. Methods Documentation
-
background
(dataset)[source]¶ Estimate predicted counts background image in energy band.
The background estimate is based on the Fermi-LAT galactic and isotropic diffuse models.
Parameters: dataset :
FermiLATDataset
Fermi basic dataset to compute images for.
Returns: background :
SkyImage
Predicted number of background counts sky image.
-
counts
(dataset)[source]¶ Estimate counts image in energy band.
Parameters: dataset :
FermiLATDataset
Fermi basic dataset to compute images for.
Returns: counts :
SkyImage
Counts sky image.
-
exposure
(dataset)[source]¶ Estimate a spectral model weighted exposure image from an exposure cube.
Parameters: dataset :
FermiLATDataset
Fermi basic dataset to compute images for.
Returns: exposure :
SkyImage
Exposure sky image.
-
run
(dataset, which='all')[source]¶ Estimate sky images.
Parameters: dataset :
FermiLATDataset
Fermi basic dataset to compute images for.
which : str or list of str
Which images to compute. Can be:
- ‘all’
- ‘counts’
- ‘background’
- ‘exposure’
- ‘excess’
- ‘flux’
- ‘psf’
Or a list containing any subset of the images listed above.
Returns: images :
SkyImageList
List of sky images.
-