OK, I think I found he problem ... it happens in the translation to Python. In ring2xyf there are integer divisions, for example: iring = (ip/(4*nside_)) + nside_; /* counted from North pole */ int ifm = (iphi - ire/2 + nside_ -1) / nside_; int ifp = (iphi - irm/2 + nside_ -1) / nside_; When translating this to Python, it is mandatory to use the integer division operator "//", otherwise the results wil be wrong: iring = ( ip // ( 4 * nside ) ) + nside ifm = ( iphi - ire//2 + nside - 1 ) // nside...
... or even simpler: could you give us values for nside and pix, for which the C and C++ versions provide different results?
Thanks for the report! To help me understand wat's going on, could you please describe how you get from the information provided by ring2xyf to the shape of pixel boundaries? It's not immediately obvious to me, since ring2xyf only deals with pixel centers. Are you working with highly supersampled pixels to trace the boundary? If you could provide an example program demonstrating the problem that would of course be even better!
Hi Yoshinori, thank you for submitting this! From the attached plot it almost looks like the Fortran code has been run without iterating (deviation in TT at low l, noise at high l), even though you specified iter_order=3. Just as an experiment, could you re-run healpy with 0 iterations and compare that to the Healpix results? Another strange thing is that the TT spectra at low l match very well for even l, but badly for odd ones. I'm pretty sure this is a hint at the source of the problem, but I...
swich version number back to 3.83
turn down version number to 3.82.1 again; this is a bugfix release
fix https://github.com/healpy/healpy/issues/968
I wouldn't recommend doing this, since this approach will become unmaintainable once you have more complicated projects. My recommendation is to learn a bit about Makefiles (or about cmake or other alternatives if you prefer) and add the appropriate Makefile or other to your code directory. Then a simple "make" will always do the expected thing, and you do not need to change global configuration files.