File: plot_aeff_param.py

package info (click to toggle)
gammapy 2.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,800 kB
  • sloc: python: 81,999; makefile: 211; sh: 11; javascript: 10
file content (15 lines) | stat: -rw-r--r-- 433 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from astropy import units as u
import matplotlib.pyplot as plt
from gammapy.irf import EffectiveAreaTable2D

ax = plt.subplot()

for instrument in ["HESS", "HESS2", "CTAO"]:
    aeff = EffectiveAreaTable2D.from_parametrization(instrument=instrument)
    aeff.plot_energy_dependence(ax=ax, label=instrument, offset=[0] * u.deg)

ax.set_yscale("log")
ax.set_xlim([1e-3, 1e3])
ax.set_ylim([1e3, 1e12])
plt.legend(loc="best")
plt.show()