test ring background method
@@ -262,6 +262,17 @@ def test_analysis_1d_stacked():
assert_allclose(pars["amplitude"].value, 5.496388e-11, rtol=1e-2)
+@requires_data()
+def test_analysis_ring_background():
+ config = get_example_config("3d")
+ config.datasets.background.method = "ring"
+ config.datasets.background.parameters = {"r_in": "0.3 deg", "width": "0.3 deg"}
+ analysis = Analysis(config)
+ analysis.get_observations()
+ analysis.get_datasets()
+ assert isinstance(analysis.datasets[0], MapDataset) is True
+
+
@requires_data()
def test_analysis_no_bkg():
config = get_example_config("1d")
