This IDL facility provides an interface to F90 'process_mask' facility. For a given input binary mask, it can determine the angular distance in Radians of each valid (1 valued) pixel to the closest invalid (0 valued) pixel, with the option of ignoring small clusters of invalid pixels. The distance map can then be used to generate an apodized mask.

Location in HEALPix directory tree: src/idl/interfaces/iprocess_mask.pro 


IDL> IPROCESS_MASK, mask_in, distance_map,[ binpath=, filled_mask=, /help, hole_arcmin2=, hole_pixels=, keep_tmp_files=, /nested, ordering=, /ring, /silent, tmpdir=]


required input: input binary mask. It can be a FITS file, or a memory array containing the mask to process.
optional output: double precision angular distance map in Radians. It can be a FITS file, or a memory array. It will have the same ordering as the input mask.


full path to back-end routine default:$HEXE/process_mask, then $HEALPIX/bin/process_mask
- a binpath starting with / (or $\backslash$),   or $ is interpreted as absolute
- a binpath starting with ./ is interpreted as relative to current directory
- all other binpathes are relative to $HEALPIX

optional output mask with holes smaller than hole_arcmin2 or hole_pixels filled in. Will have the same ordering as the input mask

if set, prints extended help

Minimal size (in arcmin2) of invalid regions to be kept (can be used together with hole_pixels, the result will be the largest of the two). default:0.0

Minimal size (in pixels) of invalid regions to be kept (can be used together with hole_arcmin2, the result will be the largest of the two). default:0

if set, temporary files are not discarded at the end of the run

if set, signals that the mask read online is in NESTED scheme (does not apply to FITS file), see also /ring and Ordering

either 'RING' or 'NESTED', ordering of online mask, see /ring and /nested

see /nested and Ordering above

if set, works silently

directory in which are written temporary files default:IDL_TMPDIR (see IDL documentation)


iprocess_mask is an interface to 'process_mask' F90 facility. It requires some disk space on which to write the parameter file and the other temporary files. Most data can be provided/generated as an external FITS file, or as a memory array.


This section lists the routines related to iprocess_mask

version 6.4 or more is necessary to run iprocess_mask.
F90 facility called by iprocess_mask.
IDL Interface to F90 alteralm
IDL Interface to F90 anafast and C++ anafast_cxx
IDL Interface to F90 smoothing
IDL Interface to F90 synfast


npix = nside2npix(256)
mask = replicate(1, npix) & mask[randomu(seed,100)*npix] = 0
iprocess_mask, mask, distance, /ring, /silent
mollview, distance
A binary mask in which 100 randomly located pixels are 0-valued (=invalid) is generated. Then the distance (in Radians) of the valid pixels to the closest invalid pixels is computed and plotted.

Version 3.31, 2017-01-06