Implement SourceCatalog.positions test
@@ -7,6 +7,7 @@ from astropy.tests.helper import pytest, assert_quantity_allclose
from astropy.table import Table, Column
from astropy.units import Quantity
from ..core import SourceCatalog
+from ...image import SkyImage
def make_test_catalog():
@@ -66,6 +67,17 @@ class TestSourceCatalog:
with pytest.raises(ValueError):
self.cat[int]
+ def test_positions(self):
+ positions = self.cat.positions
+ assert len(positions) == 3
+
+ def test_select_image_region(self):
+ reference = SkyImage.empty(xref=42.2, yref=1, nxpix=5, nypix=5,
+ coordsys='CEL')
+ selection = self.cat.select_image_region(reference)
+
+ assert len(selection.table) == 1
+
class TestSourceCatalogObject:
def setup(self):
