Missing notebook modification
"from gammapy.irf import EnergyDispersion, EffectiveAreaTable\n",
"from gammapy.spectrum import SpectrumSimulation, SpectrumFit\n",
"from gammapy.spectrum.models import PowerLaw\n",
- "from gammapy.irf import CTAIrf"
+ "from gammapy.irf import load_cta_irfs"
]
},
{
"filename = (\n",
" \"$GAMMAPY_DATA/cta-1dc/caldb/data/cta/1dc/bcf/South_z20_50h/irf_file.fits\"\n",
")\n",
- "cta_irf = CTAIrf.read(filename)"
+ "cta_irf = load_cta_irfs(filename)"
]
},
{
"metadata": {},
"outputs": [],
"source": [
- "aeff = cta_irf.aeff.to_effective_area_table(offset=offset, energy=energy)\n",
+ "aeff = cta_irf['aeff'].to_effective_area_table(offset=offset, energy=energy)\n",
"aeff.plot()\n",
"plt.loglog()\n",
- "print(cta_irf.aeff.data)"
+ "print(cta_irf['aeff'].data)"
]
},
{
"metadata": {},
"outputs": [],
"source": [
- "edisp = cta_irf.edisp.to_energy_dispersion(\n",
+ "edisp = cta_irf['edisp'].to_energy_dispersion(\n",
" offset=offset, e_true=energy, e_reco=energy\n",
")\n",
"edisp.plot_matrix()\n",
