EDispKernelMap¶
-
class
gammapy.irf.
EDispKernelMap
(edisp_kernel_map, exposure_map)[source]¶ Bases:
gammapy.irf.irf_map.IRFMap
Energy dispersion kernel map.
- Parameters
Attributes Summary
Methods Summary
copy
(self)Copy IRF map
cutout
(self, position, width[, mode])Cutout IRF map.
from_diagonal_response
(energy_axis, …)Create an all-sky energy dispersion map with diagonal response.
from_geom
(geom)Create edisp map from geom.
from_hdulist
(hdulist[, hdu, hdu_bands, …])Create from
HDUList
.get_edisp_kernel
(self, position)Get energy dispersion at a given position.
read
(filename)Read an IRF_map from file and create corresponding object
stack
(self, other[, weights])Stack IRF map with another one in place.
to_hdulist
(self)Convert to
HDUList
.write
(self, filename[, overwrite])Write IRF map to fits
Attributes Documentation
-
edisp_map
¶
Methods Documentation
-
copy
(self)¶ Copy IRF map
-
cutout
(self, position, width, mode='trim')¶ Cutout IRF map.
- Parameters
- Returns
- cutout
IRFMap
Cutout IRF map.
- cutout
-
classmethod
from_diagonal_response
(energy_axis, energy_axis_true)[source]¶ Create an all-sky energy dispersion map with diagonal response.
- Parameters
- energy_axis
MapAxis
Energy axis.
- energy_axis_true
MapAxis
True energy axis
- energy_axis
- Returns
- edisp_map
EDispKernelMap
Energy dispersion kernel map.
- edisp_map
-
classmethod
from_geom
(geom)[source]¶ Create edisp map from geom.
By default a diagonal edisp matrix is created.
- Parameters
- geom
Geom
Edisp map geometry.
- geom
- Returns
- edisp_map
EDispKernelMap
Energy dispersion kernel map.
- edisp_map
-
classmethod
from_hdulist
(hdulist, hdu=None, hdu_bands=None, exposure_hdu=None, exposure_hdu_bands=None)¶ Create from
HDUList
.- Parameters
- hdulist
HDUList
HDU list.
- hdustr
Name or index of the HDU with the IRF map.
- hdu_bandsstr
Name or index of the HDU with the IRF map BANDS table.
- exposure_hdustr
Name or index of the HDU with the exposure map data.
- exposure_hdu_bandsstr
Name or index of the HDU with the exposure map BANDS table.
- hdulist
- Returns
- irf_map
IRFMap
IRF map.
- irf_map
-
get_edisp_kernel
(self, position)[source]¶ Get energy dispersion at a given position.
- Parameters
- position
SkyCoord
the target position. Should be a single coordinates
- position
- Returns
- edisp
EnergyDispersion
the energy dispersion (i.e. rmf object)
- edisp
-
classmethod
read
(filename)¶ Read an IRF_map from file and create corresponding object
-
stack
(self, other, weights=None)¶ Stack IRF map with another one in place.
- Parameters
- other
IRFMap
Energy dispersion map to be stacked with this one.
- weights
Map
Map with stacking weights.
- other
-
write
(self, filename, overwrite=False, **kwargs)¶ Write IRF map to fits