Skip to content

Commit

Permalink
add require gammapy-extra
Browse files Browse the repository at this point in the history
  • Loading branch information
registerrier committed Nov 14, 2018
1 parent 2cc8301 commit aae781a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions gammapy/irf/io.py
Expand Up @@ -6,10 +6,10 @@
from .energy_dispersion import EnergyDispersion2D
from .psf_gauss import EnergyDependentMultiGaussPSF

__all__ = ["load_CTA_1DC_IRF"]
__all__ = ["load_cta_irfs"]


def load_CTA_1DC_IRF(filename = "$GAMMAPY_DATA/cta-1dc/caldb/data/cta/1dc/bcf/South_z20_50h/irf_file.fits"):
def load_cta_irfs(filename = "$GAMMAPY_DATA/cta-1dc/caldb/data/cta/1dc/bcf/South_z20_50h/irf_file.fits"):
"""load CTA instrument response function and return a dictionary container.
The IRF format should be compliant with the one discussed
Expand Down
7 changes: 2 additions & 5 deletions gammapy/irf/tests/test_io.py
Expand Up @@ -3,10 +3,7 @@
from astropy.units import Quantity
from numpy.testing import assert_allclose
from ...utils.testing import requires_data
from ..io import CTAIrf, CTAPerf
from ...utils.testing import requires_data, requires_dependency, mpl_plot_check
from ...utils.testing import assert_quantity_allclose
from ..io import load_CTA_1DC_IRF
from ..io import load_cta_irfs


@requires_data("gammapy-extra")
Expand All @@ -16,7 +13,7 @@ def test_cta_irf():
filename = (
"$GAMMAPY_DATA/cta-1dc/caldb/data/cta/1dc/bcf/South_z20_50h/irf_file.fits"
)
irf = load_CTA_1DC_IRF(filename)
irf = load_cta_irfs(filename)

energy = Quantity(1, "TeV")
offset = Quantity(3, "deg")
Expand Down

0 comments on commit aae781a

Please sign in to comment.