Adapt test irf name
@@ -6,7 +6,7 @@ from gammapy.irf.core import IRF, FoVAlignment
from gammapy.maps import MapAxis
-class TestIRF(IRF):
+class MyCustomIRF(IRF):
tag = "myirf"
required_axes = ["energy", "offset"]
default_unit = u.deg
@@ -17,8 +17,8 @@ def test_irf_init_quantity():
offset_axis = MapAxis.from_bounds(0, 2.5, 5, unit="deg", name="offset")
data = np.full((10, 5), 1)
- irf = TestIRF(axes=[energy_axis, offset_axis], data=data, unit=u.deg)
- irf2 = TestIRF(axes=[energy_axis, offset_axis], data=data * u.deg)
+ irf = MyCustomIRF(axes=[energy_axis, offset_axis], data=data, unit=u.deg)
+ irf2 = MyCustomIRF(axes=[energy_axis, offset_axis], data=data * u.deg)
assert np.all(irf.quantity == irf2.quantity)
@@ -27,7 +27,7 @@ def test_immutable():
energy_axis = MapAxis.from_energy_bounds(10, 100, 10, unit="TeV", name="energy")
offset_axis = MapAxis.from_bounds(0, 2.5, 5, unit="deg", name="offset")
data = np.full((10, 5), 1) * u.deg
- test_irf = TestIRF(
+ test_irf = MyCustomIRF(
axes=[energy_axis, offset_axis],
data=data,
is_pointlike=False,
@@ -46,7 +46,7 @@ def test_slice_by_idx():
offset_axis = MapAxis.from_bounds(0, 2.5, 5, unit="deg", name="offset")
data = np.full((10, 5), 1)
- irf = TestIRF(axes=[energy_axis, offset_axis], data=data, unit=u.deg)
+ irf = MyCustomIRF(axes=[energy_axis, offset_axis], data=data, unit=u.deg)
irf_sliced = irf.slice_by_idx({"energy": slice(3, 7)})
assert irf_sliced.data.shape == (4, 5)
