irf - Instrument response functions


Typically the IRFs are stored in the form of multidimensional tables giving the response functions such as the distribution of gamma-like events or the probability density functions of the reconstructed energy and position.

For a more detailed definition of the response function you are invited to read IRF Theory.

gammapy.irf handles the following instrument response functions (IRFs):

Most of the formats defined at IRFs are supported. At the moment, there is little support for Fermi-LAT or other instruments.

Most users will not use gammapy.irf directly, but will instead use IRFs as part of their spectrum, image or cube analysis to compute exposure and effective EDISP and PSF for a given dataset.

IRF axis naming

In the IRF classes we use the following axis naming convention:




Reconstructed energy axis (\(E\) in IRF Theory)


True energy axis (\(E_{\rm true}\) in IRF Theory)


Field of view offset from center (\(p_{\rm true}\) in IRF Theory)


Field of view longitude


Field of view latitude


Energy migration (\(\mu\) in IRF Theory)


Offset angle from source position (\(\delta p\) in IRF Theory)

Getting started

See cta.html for an example how to access IACT IRFs.

Using gammapy.irf

If you’d like to learn more about using gammapy.irf, read the following sub-pages:


gammapy.irf Package

Instrument response functions (IRFs).


EffectiveAreaTable2D(axes[, data, unit, …])

2D effective area table.

EnergyDispersion2D(axes[, data, unit, meta, …])

Offset-dependent energy dispersion matrix.

PSF3D(axes[, data, unit, meta, interp_kwargs])

PSF with axes: energy, offset, rad.

EnergyDependentMultiGaussPSF(axes[, data, …])

Triple Gauss analytical PSF depending on true energy and offset.

PSFKing(axes[, data, unit, meta, interp_kwargs])

King profile analytical PSF depending on energy and offset.

Background3D(axes[, data, unit, meta, …])

Background 3D.

Background2D(axes[, data, unit, meta, …])

Background 2D.

PSFMap(psf_map[, exposure_map])

Class containing the Map of PSFs and allowing to interact with it.

EDispKernelMap(edisp_kernel_map[, exposure_map])

Energy dispersion kernel map.

RadMax2D(axes[, data, unit, meta, interp_kwargs])

2D Rad Max table.

EDispMap(edisp_map[, exposure_map])

Energy dispersion map.



Registry class.