def test_storekdtree(): cat_a, cat_b = make_mockup() res_fcm = run_FoFCatalogMatching(cat_a, cat_b, return_pandas=True) res_sl2 = run_with_storekdtree(cat_a, cat_b, False) res_sl1 = run_with_storekdtree(cat_a, cat_b, True) testing.assert_equal(res_fcm, res_sl1) testing.assert_equal(res_sl1, res_sl2)
def test_graph_lib(): cat_a, cat_b = make_mockup() res_fcm = run_FoFCatalogMatching(cat_a, cat_b, return_pandas=True) res_sl = skylink.match( { "a": cat_a, "b": cat_b }, linking_lengths=linking_lengths_default, graph_lib=graph_lib, nprocs=ncpus_max, silent=True, return_pandas=True, ) testing.assert_equal(res_fcm, res_sl)
def test_overlap(): cat_a, cat_b = make_mockup() res_fcm = run_FoFCatalogMatching(cat_a, cat_b, return_pandas=True) res_sl1 = run_with_overlap(cat_a, cat_b, 1.0) res_sl2 = run_with_overlap(cat_a, cat_b, 1.1) res_sl3 = run_with_overlap(cat_a, cat_b, 1.2) testing.assert_equal(res_fcm, res_sl1) testing.assert_equal(res_sl1, res_sl2) testing.assert_equal(res_sl2, res_sl3)
def test_nprocs(): # TODO: test equality with more than 2 catalogs cat_a, cat_b = make_mockup() res_fcm = run_FoFCatalogMatching(cat_a, cat_b, return_pandas=True) res_sl1 = run_with_ncpus(cat_a, cat_b, 1) res_sl2 = run_with_ncpus(cat_a, cat_b, 2) res_sl3 = run_with_ncpus(cat_a, cat_b, ncpus_max) testing.assert_equal(res_fcm, res_sl1) testing.assert_equal(res_sl1, res_sl2) testing.assert_equal(res_sl2, res_sl3)