From 15144c2c2959c7094d1ae02dd2911549ac86e1a8 Mon Sep 17 00:00:00 2001 From: "Derek T. Jones" Date: Thu, 19 Dec 2024 23:18:39 +0000 Subject: [PATCH] RA and DEC must be double-precision, not single, or radec2pix fails with TypeError --- src/hats_import/margin_cache/margin_cache_map_reduce.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hats_import/margin_cache/margin_cache_map_reduce.py b/src/hats_import/margin_cache/margin_cache_map_reduce.py index 52600fef..046d8641 100644 --- a/src/hats_import/margin_cache/margin_cache_map_reduce.py +++ b/src/hats_import/margin_cache/margin_cache_map_reduce.py @@ -45,8 +45,8 @@ def map_pixel_shards( margin_pixel_list = hp.radec2pix( margin_order, - data[ra_column].values, - data[dec_column].values, + data[ra_column].values.astype("d"), + data[dec_column].values.astype("d"), ) margin_pixel_filter = pd.DataFrame( {"margin_pixel": margin_pixel_list, "filter_value": np.arange(0, len(margin_pixel_list))}