harmonic_ud_grade changes map NSIDE through spherical-harmonic transforms with pixel-window and beam transfer corrections following Eq. 1 of Planck 2015 X (arXiv:1502.01588).
The two main modes are:
fwhm_out=0 (default): plain bandlimit truncation with pixel window correction
fwhm_out=None: applies the effective resolution beam (\(3 \times \theta_{\rm pix}\)) to suppress Gibbs ringing
import numpy as npimport healpy as hpimport matplotlib.pyplot as plthp.disable_warnings()print(f"healpy {hp.__version__}")
healpy 1.19.1.dev34+gb6c6692e5.d20260529
/tmp/ipykernel_2454585/3900260292.py:5: HealpyDeprecationWarning: The disable_warnings function is deprecated and may be removed in a future version.
hp.disable_warnings()
/tmp/ipykernel_2454585/2046387934.py:5: HealpyDeprecationWarning: "verbose" was deprecated in version 1.15.0 and will be removed in a future version.
m = hp.synfast(cls=np.arange(1, 1001)**(-2.5), nside=nside_in, lmax=3*nside_in-1, verbose=False)