This IDL facility provides a means to upgrade/degrade or reorder a Healpix full sky map contained in a FITS file or loaded in memory.
Location in HEALPix directory tree: src/idl/toolkit/ud_grade.pro
IDL> UD_GRADE , Map_in, Map_out [, NSIDE_OUT=, ORDER_IN=, ORDER_OUT=, BAD_DATA=, PESSIMISTIC=]
ud_grade can upgrade/degrade a full sky HEALPix map using the hierarchical properties of HEALPix . It can also reorder a full sky map (from NEST to RING and vice-versa). It operates on FITS files as well as on memory variables. The degradation/upgradation is done assuming an intensive quantity (like temperature) that does not scale with surface area. In case of degradation a big pixel that contains at least one bad small pixel is considered as bad itself. When operating on FITS files, the header information from the input file that is not directly related the ordering/resolution is copied unchanged into the output file.
This section lists the routines related to ud_grade
EXAMPLE # 1:
ud_grade reads the FITS file map_512.fits (that allegedly contains a map with NSIDE=512), and write in the FITS file map_256.fits a map degraded to resolution 256, with the same ordering.
EXAMPLE # 2:
ud_grade reads the FITS file map_512.fits (that allegedly contains a map with NSIDE=512), and writes in the FITS file map_Nest256.fits a map degraded to resolution 256, with NESTED ordering.
EXAMPLE # 3:
mymap is IDL variable containing a HEALPix NESTED-ordered map with resolution nside=256. ud_grade upgrades this map to a resolution of 1024, reorder it to RING and write it in the IDL vector mymap2.
Eric Hivon 2010-06-18