# IRF Theory¶

TODO: do a detailed writeup of how IRFs are implemented and used in Gammapy.

For high-level gamma-ray data analysis (measuring morphology and spectra of sources) a canonical detector model is used, where the gamma-ray detection process is simplified as being fully characterized by the following three “instrument response functions”:

• Effective area $$A(p, E)$$ (unit: $$m^2$$)
• Point spread function $$PSF(p'|p, E)$$ (unit: $$sr^{-1}$$)
• Energy dispersion $$D(E'|p, E)$$ (unit: $$TeV^{-1}$$)

The effective area represents the gamma-ray detection efficiency, the PSF the angular resolution and the energy dispersion the energy resolution of the instrument.

The full instrument response is given by

$R(p', E'|p, E) = A(p, E) \times PSF(p'|p, E) \times D(E'|p, E),$

where $$p$$ and $$E$$ are the true gamma-ray position and energy and $$p'$$ and $$E'$$ are the reconstructed gamma-ray position and energy.

The instrument function relates sky flux models to expected observed counts distributions via

$N(p', E') = t_{obs} \int_E \int_\Omega R(p', E'|p, E) \times F(p, E) dp dE,$

where $$F$$, $$R$$, $$t_{obs}$$ and $$N$$ are the following quantities:

• Sky flux model $$F(p, E)$$ (unit: $$m^{-2} s^{-1} TeV^{-1} sr^{-1}$$)
• Instrument response $$R(p', E'|p, E)$$ (unit: $$m^2 TeV^{-1} sr^{-1}$$)
• Observation time: $$t_{obs}$$ (unit: $$s$$)
• Expected observed counts model $$N(p', E')$$ (unit: $$sr^{-1} TeV^{-1}$$)

If you’d like to learn more about instrument response functions, have a look at the descriptions for Fermi, for TeV data analysis and for GammaLib.

TODO: add an overview of what is / isn’t available in Gammapy.