From 07f5175c3e8ba73ab0956f95adc0e903be74521d Mon Sep 17 00:00:00 2001 From: Sasha Rahlin Date: Tue, 19 Sep 2023 22:31:05 +0200 Subject: [PATCH] make sure high-res map indexing is not nonsense --- maps/tests/healpix_maps.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maps/tests/healpix_maps.py b/maps/tests/healpix_maps.py index 3857c4f7..0e141820 100755 --- a/maps/tests/healpix_maps.py +++ b/maps/tests/healpix_maps.py @@ -221,3 +221,9 @@ lon, lat = maps.azel.convert_radec_to_gal(alpha, delta) pix = xeq.angles_to_pixels(lon, lat) assert(np.allclose(np.asarray(pix), np.asarray(xeq))) + +# high-res +hx = maps.HealpixSkyMap(16384) +pix1 = hx.angle_to_pixel(0, -45 * core.G3Units.deg) +pix2 = hp.ang2pix(16384, 3 * np.pi / 4, 0) +assert(pix1 == pix2)