ud_grade

This IDL facility provides a means to upgrade/degrade or reorder a full sky or cut-sky HEALPix map contained in a FITS file or loaded in memory.

Location in HEALPix directory tree: src/idl/toolkit/ud_grade.pro 


FORMAT

IDL> UD_GRADE, Map_in, Map_out [, BAD_DATA=, HELP=, NSIDE_OUT=, ORDER_IN=, ORDER_OUT=, /PESSIMISTIC]


QUALIFIERS

Map_in
input map: either a character string with the name of a FITS file containing a full-sky or cut-sky Healpix data set, or a memory vector (real, integer, ...) containing a full sky data set.
Map_out
reordered map: if map_in was a filename, map_out should be a filename, otherwise map_out should point to a memory array


KEYWORDS

BAD_DATA =
flag value of missing pixels. default:!healpix.bad_value $\equiv -1.6375\ 10^{30}$.
/HELP
if set, the documentation header is printed out and the code exits
NSIDE_OUT =
output resolution parameter, can be larger or smaller than the input one (scalar integer). default:same as input: map unchanged or simply reordered
ORDER_IN =
input map ordering (either 'RING' or 'NESTED') default:same as the input FITS keyword ORDERING if applicable.
ORDER_OUT =
output map ordering (either 'RING' or 'NESTED') default:same as ORDER_IN.
/PESSIMISTIC
$\textstyle \parbox{0.5\hsize}{if set, during {\bf degradation} each big pixel c...
...ast one good pixel
is considered as good (optimistic)
default = 0 (:not set)}$


DESCRIPTION

ud_grade can upgrade/degrade a HEALPix map using the hierarchical properties of HEALPix. It can also reorder a sky map (from NEST to RING and vice-versa). It operates on FITS files as well as on memory variables. Cut-sky operations are only accessible via FITS files. 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.


RELATED ROUTINES

This section lists the routines related to ud_grade

idl
version 6.4 or more is necessary to run ud_grade.
reorder
reorder a full sky Healpix map.


EXAMPLE # 1:

ud_grade, 'map_512.fits', 'map_256.fits', nside_out = 256
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, 'map_512.fits', 'map_Nest256.fits', nside_out = 256, $
order_out = 'NESTED'
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:

read_fits_map, 'map_Nest256.fits', mymap
ud_grade, mymap, mymap2, nside_out = 1024, order_in='NESTED', order_out='RING'
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.

Version 3.83, 2024-11-13