Changed reflected background test to comply with new solution
@@ -4,7 +4,7 @@ import pytest
from astropy.coordinates import SkyCoord, Angle
from regions import CircleSkyRegion
from ...utils.testing import requires_data, requires_dependency, assert_quantity_allclose
-from ...maps import WcsNDMap
+from ...maps import WcsNDMap, WcsGeom
from ...data import DataStore
from ..reflected import ReflectedRegionsFinder, ReflectedRegionsBackgroundEstimator
@@ -14,8 +14,9 @@ def mask():
"""Example mask for testing."""
pos = SkyCoord(83.63, 22.01, unit='deg', frame='icrs')
exclusion_region = CircleSkyRegion(pos, Angle(0.3, 'deg'))
- template_map = WcsNDMap.create(skydir=pos, binsz=0.02, width=10.)
- return template_map.make_region_mask(exclusion_region, inside=False)
+ geom = WcsGeom.create(skydir=pos, binsz=0.02, width=10.)
+ mask = geom.region_mask([exclusion_region], inside=False)
+ return WcsNDMap(geom, data=mask)
@pytest.fixture
