diff --git a/tests/lsdb/catalog/test_cone_search.py b/tests/lsdb/catalog/test_cone_search.py index f162c2a..cb7104a 100644 --- a/tests/lsdb/catalog/test_cone_search.py +++ b/tests/lsdb/catalog/test_cone_search.py @@ -4,7 +4,8 @@ def test_cone_search_filters_correct_points(small_sky_order1_catalog_cloud): ra = 0 dec = -80 - radius = 20 + radius_degrees = 20 + radius = radius_degrees * 3600 center_coord = SkyCoord(ra, dec, unit="deg") cone_search_catalog = small_sky_order1_catalog_cloud.cone_search(ra, dec, radius).compute() print(len(cone_search_catalog)) @@ -12,7 +13,7 @@ def test_cone_search_filters_correct_points(small_sky_order1_catalog_cloud): row_ra = row[small_sky_order1_catalog_cloud.hc_structure.catalog_info.ra_column] row_dec = row[small_sky_order1_catalog_cloud.hc_structure.catalog_info.dec_column] sep = SkyCoord(row_ra, row_dec, unit="deg").separation(center_coord) - if sep.degree <= radius: + if sep.degree <= radius_degrees: assert len(cone_search_catalog.loc[cone_search_catalog["id"] == row["id"]]) == 1 else: assert len(cone_search_catalog.loc[cone_search_catalog["id"] == row["id"]]) == 0 @@ -21,7 +22,8 @@ def test_cone_search_filters_correct_points(small_sky_order1_catalog_cloud): def test_cone_search_filters_partitions(small_sky_order1_catalog_cloud): ra = 0 dec = -80 - radius = 20 + radius_degrees = 20 + radius = radius_degrees * 3600 hc_conesearch = small_sky_order1_catalog_cloud.hc_structure.filter_by_cone(ra, dec, radius) consearch_catalog = small_sky_order1_catalog_cloud.cone_search(ra, dec, radius) assert len(hc_conesearch.get_healpix_pixels()) == len(consearch_catalog.get_healpix_pixels())