PSF3DChecker

class gammapy.irf.PSF3DChecker(psf, d_norm=0.01, containment_fraction=0.68, d_rel_containment=0.7)[source]

Bases: object

Automated quality checks for gammapy.irf.PSF3D.

At the moment used for HESS HAP HD.

Parameters:

psf : PSF3D

PSF to check

d_norm : float

Config option: maximum norm deviation from 1

containment_fraction : float

Config option: containment fraction to check

d_rel_containment : float

Config option: maximum relative difference of containment radius between neighboring bins

Examples

To check a PSF, load it, run the checker and look at the results dict:

from gammapy.irf import PSF3D, PSF3DChecker
filename = '$GAMMAPY_EXTRA/datasets/hess-hap-hd-prod3/psf_table.fits.gz'
psf = PSF3D.read(filename)
checker = PSF3DChecker(psf)
print('config: ', checker.config)
checker.check_all()
print('results: ', checker.results)

Methods Summary

check_all() Run all checks.
check_containment() Check PSF containment.
check_nan() Check for NaN values in PSF.
check_normalise() Check PSF normalisation.

Methods Documentation

check_all()[source]

Run all checks.

check_containment()[source]

Check PSF containment.

TODO: describe what this actually does!?

check_nan()[source]

Check for NaN values in PSF.

check_normalise()[source]

Check PSF normalisation.

For each energy / offset, the PSF should integrate to 1.