Use Astropy simple_norm in docs/irf/plot_fermi_psf.py
"""Plot Fermi PSF."""
import matplotlib.pyplot as plt
from astropy import units as u
+from astropy.visualization import simple_norm
from gammapy.datasets import FermiGalacticCenter
from gammapy.irf import EnergyDependentTablePSF
from gammapy.image import SkyImage
@@ -17,7 +18,7 @@ energies = [1] * u.GeV
for energy in energies:
psf = fermi_psf.table_psf_at_energy(energy=energy)
image_psf.data = psf.kernel(image_psf)
- norm = image_psf.plot_norm('log')
+ norm = simple_norm(image_psf.data, stretch='log')
image_psf.plot(fig=fig, add_cbar=True, norm=norm)
plt.show()
