def test_find_sources(self):
srcs = aa._find_sources(self.image_ref)
from scipy.spatial import KDTree
ref_coordtree = KDTree(self.star_ref_pos)
# Compare here srcs list with self.star_ref_pos
num_sources = 0
for asrc in srcs:
found_source = ref_coordtree.query_ball_point(asrc, 3)
if found_source:
num_sources += 1
fraction_found = float(num_sources) / float(len(srcs))
self.assertGreater(fraction_found, 0.85)
评论列表
文章目录