Bug Correction in synfast 2.14

Thanks to the routine alm2map_der, the Fortran90 synfast facility produces maps of I,Q,U Stokes parameters and their first and second spatial derivatives, starting from C(l) or alm coefficients. A bug affecting the calculation of $\partial X/\partial\theta$, $\partial^2 X/\partial \theta^2$, $\partial^2 X/(\partial\theta\partial\varphi\sin(\theta))$, for X=(Q,U) was detected in this routine and has been fixed in release 2.14 (March 2010).

In what follows, the impact of this bug on the power spectra of the produced maps is quantified, so that users can assess how much their work could have been affected by this bug.

Figure 1: Left panels: comparison of the EE power spectra C(l) computed on polarized maps derivatives generated by synfast-2.13a (Old maps, blue bashes), the bug corrected synfast-2.14 (New maps, black lines) and their differences (Diff maps, magenta lines). Note that what is plotted is C(l), not the customary $l(l+1)C(l)/2\pi$. Right panels show respectively the relative error on the EE power spectrum of the old derivatives maps compared to that of the new maps. The red dashes show analytical fit to these errors.
Image error_der

In Figure 1 we show the polarization EE power spectrum of $N_{\rm side} = 1024$ maps in which the Stokes parameters (Q,U) have been replaced by, in turn, their derivatives $\partial (Q,U)/\partial\theta$, $\partial^2 (Q,U)/\partial \theta^2$, $\partial^2 (Q,U)/(\partial\theta\partial\varphi\sin\theta)$, for maps generated by either the version 2.13a of synfast or the corrected version 2.14, or the difference of the two set of maps. The input power spectra were those of WMAP-1yr $\Lambda$-CDM best fit model with a Gaussian beam FWHM of 10 arcmin. The power spectra were computed on the whole maps, except for 12 pixels around each pole that were masked out, because they get very bright in second order derivatives.

It can be seen that the relative effect of the computation error on the produced maps was large at low l, at scales on which derivatives maps contain little power, but decreasing steadily with l.

It should be stressed that the following quantities were not affected by the bug described above:

* the Stokes parameters themselves (I,Q,U),
* the intensity I and all its derivatives,
* the Laplacians $\Delta I, \Delta Q$ and $\Delta U$, with $\Delta \equiv \left(
+ \cot\theta\frac{\partial}{\partial\theta} +

Version 3.31, 2017-01-06