load_cta_irfs#

gammapy.irf.load_cta_irfs(filename)[source]#

Deprecated since version v1.1: The load_cta_irfs function is deprecated and may be removed in a future version. Use load_irf_dict_from_file instead.

Load IRFs from file as written by the CTA DC1 into a dict

This function has a hardcoded list of IRF types and HDU names and does not check what types of IRFs are actually present in the file.

Please use load_irf_dict_from_file instead..

The IRF format should be compliant with the one discussed at http://gamma-astro-data-formats.readthedocs.io/en/latest/irfs/.

The various IRFs are accessible with the following keys:

Parameters
filenamestr

the input filename. Default is

Returns
cta_irfdict

the IRF dictionary

Examples

Access the CTA 1DC IRFs stored in the gammapy datasets

>>> from gammapy.irf import load_cta_irfs
>>> filename = "$GAMMAPY_DATA/cta-1dc/caldb/data/cta/1dc/bcf/South_z20_50h/irf_file.fits"
>>> cta_irf = load_cta_irfs(filename)
>>> print(cta_irf['aeff'])
EffectiveAreaTable2D
--------------------

  axes  : ['energy_true', 'offset']
  shape : (42, 6)
  ndim  : 2
  unit  : m2
  dtype : >f4