Search code examples
pythonhealpy

Proper way to degrade a healpix map


I'm trying to degrade a CMB map in healpix format from Nside=4096 to Nside=2048. To my knowledge, there are two ways to achieve this:

(a) convert to alm using map2alm and then convert back to a Nside=2048 map using alm2map. (b) use ud_grade in healpix/healpy,

I have tested both of these and I get different results. For (a), I recover the correct input spectrum but I see "ringing" effects around pixels where the gradient is large (i.e. around point sources). When I use (b), I do not recover the input spectrum. I have tried dividing my output spectrum by pixwin(2048)**2 but that does not fix the problem.

What is the proper way to degrade a realistic map preserving the correct spectrum, and without inducing ringing effects in the map?

Thanks in advance,

Spectrum using method (b)

Ringing effect around point sources


Solution

  • If your main requirement is to preserve the spectrum, going with method (a) is the best. Then you need to mask the point sources, if your application deals with spectra, you probably want to do that anyway. Sharp gradients are not well represented in spherical harmonics domain.