Exemple #1
0
    def test_get_sky_coordinates(self):

        catalog = Catalog(self.SAMPLE_CATALOG_PATH)
        self.assertEqual(len(catalog), 127)
        coordinates = catalog.get_sky_coordinates()

        # There should be as many Coordinates objects, and in the same order,
        # as sources there are in the SExtractor catalog. Therefore, the right
        # ascension and declination of the i-th Coordinates object must match
        # those of the i-th source in the Catalog.

        self.assertEqual(len(coordinates), len(catalog))
        for coord, star in zip(coordinates, catalog):
            self.assertEqual(coord.ra, star.alpha)
            self.assertEqual(coord.dec, star.delta)
Exemple #2
0
    def test_get_sky_coordinates(self):

        catalog = Catalog(self.SAMPLE_CATALOG_PATH)
        self.assertEqual(len(catalog), 127)
        coordinates = catalog.get_sky_coordinates()

        # There should be as many Coordinates objects, and in the same order,
        # as sources there are in the SExtractor catalog. Therefore, the right
        # ascension and declination of the i-th Coordinates object must match
        # those of the i-th source in the Catalog.

        self.assertEqual(len(coordinates), len(catalog))
        for coord, star in zip(coordinates, catalog):
            self.assertEqual(coord.ra, star.alpha)
            self.assertEqual(coord.dec, star.delta)