healpy.pixelfunc.ud_grade(map_in, nside_out, pess=False, order_in='RING', order_out=None, power=None, dtype=None)

in degrading the resolution, ud_grade sets the value of the superpixel as the mean of the children pixels.

Parameters
map_inarray-like or sequence of array-like

the input map(s) (if a sequence of maps, all must have same size)

nside_outint

the desired nside of the output map(s)

pessbool

if True, in degrading, reject pixels which contains a bad sub_pixel. Otherwise, estimate average with good pixels

order_in, order_outstr

pixel ordering of input and output (‘RING’ or ‘NESTED’)

powerfloat

if non-zero, divide the result by (nside_in/nside_out)**power Examples: power=-2 keeps the sum of the map invariant (useful for hitmaps), power=2 divides the mean by another factor of (nside_in/nside_out)**2 (useful for variance maps)

dtypetype

the type of the output map

Returns
map_outarray-like or sequence of array-like

>>> import healpy as hp