Closed zonca closed 1 year ago
the feature at high ell in the Nside 8192 maps is due to ud_grade
performed on the "Galactic plane fix" procedure, where we replace the galactic signal with the input maps which are at Nside 2048.
The feature disappears if we mask the galaxy (T plot only):
This is a case similar to synchrotron, and is as well related to the "Galactic plane fix", see https://github.com/CMB-S4/s4mapbasedsims/issues/29#issuecomment-1601052252. So same solution, I will add reference to this to the documentation and will monitor this in future releases of the models.
smoothing only (for example 0.9 arcmin in the plot below), is not sufficient to get rid of this artifact, so the solution is to mask, which is the standard way of taking a spectrum anyway.
Notebook used to create the debugging plots above https://gist.github.com/zonca/881c773ff479146e908378091615e175 (modification of notebook to create the templates which is in the repo already)
Wow! this is somehow consistent with what we've observed for synchrotron as well https://github.com/galsci/pysm/issues/169#issuecomment-1609635676 ! is it the ud_grade
routine then ?
I am pretty sure here for dust because it doesn't happen at 2048. It would be interesting to do a test where instead of ud_grade we apply the galactic plane fix in spherical harmonics domain, however that would be too slow for on-the-fly models like s6 and d11, so we might have to precompute all resolutions beforehand.
Dust and synchrotron templates are produced in 2 stages. First the actual modeling is performed at Nside 2048 or lower, then the output products, generally Alm of large scales and C_ell of small scales are saved. In the second step those artifacts are loaded, a realization of the small scales with a specific seed and ell_max at 16384, then everything is assembled into the templates.
Given https://github.com/galsci/pysm/pull/164, it is necessary to verify all outputs more carefully even in the second stage.