Add regression test for psf containemnt coordinate handling
@@ -478,3 +478,17 @@ def test_psf_map_plot_psf_vs_rad():
with mpl_plot_check():
psf.plot_psf_vs_rad()
+
+
+def test_psf_containment_coords():
+ # regression test to check the cooordinate conversion for PSFMap.containment
+ psf = PSFMap.read("$GAMMAPY_DATA/cta-1dc-gc/cta-1dc-gc.fits.gz", hdu="PSF")
+
+ position = SkyCoord("266.415d", "-29.006d", frame="icrs")
+
+ radius = psf.containment_radius(
+ energy_true=1 * u.TeV, fraction=0.99, position=position
+ )
+
+ assert_allclose(radius, 0.10575 * u.deg, rtol=1e-5)
+
