diff --git a/test/test_GSky.cpp b/test/test_GSky.cpp index cca3990..de5f5ee 100644 --- a/test/test_GSky.cpp +++ b/test/test_GSky.cpp @@ -1,7 +1,7 @@ /*************************************************************************** * test_GSky.cpp - Test sky module * * ----------------------------------------------------------------------- * - * copyright (C) 2010-2021 by Juergen Knoedlseder * + * copyright (C) 2010-2022 by Juergen Knoedlseder * * ----------------------------------------------------------------------- * * * * This program is free software: you can redistribute it and/or modify * @@ -1489,6 +1489,21 @@ void TestGSky::test_GSkyMap(void) } test_value(sum_smooth2, ref_smooth, "Check GAUSSIAN smoothing"); + // Load map for correlation + GSkyMap map_correlate(sky_map); + + // Correlate map using DISK kernel + GSkyMap map_correlate1 = map_correlate; + map_correlate1.correlate("DISK", 0.2); + map_correlate1.save("test_map_correlate_disk.fits", true); + + // Compute sum of correlated sky map + double sum_correlate1 = 0.0; + for (int pix = 0; pix < map_correlate1.npix(); ++pix) { + sum_correlate1 += map_correlate1(pix); + } + test_value(sum_correlate1, 322194236.407357, "Check DISK correlation"); + // Trim the skymap based on pixels int startx = 2; int stopx = 5;