NASA - Jet Propulsion Laboratory
    + View the NASA Portal
Search JPL
Jet Propulsion Laboratory Home Earth Solar System Stars & Galaxies Technology
Introduction Background Software Links


median_filter


This IDL facility allows the median filtering of a Healpix map.


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


FORMAT

IDL> MEDIAN_FILTER (InputMap, Radius, MedianMap [,ORDERING=, /RING, /NESTED, /FILL_HOLES, /DEGREES, /ARCMIN])


QUALIFIERS


InputMap
(IN) either an IDL array containing a full sky Healpix map to filter ('online' usage), or the name of an external FITS file containing a full sky or cut sky map

Radius
(IN) radius of the disk on which the median is computed. It is in Radians, unless /DEGREES or /ARCMIN are set

MedianMap
(OUT) either an IDL variable containing on output the filtered map, or the name of an external FITS file to contain the map. Should be of same type of InputMap. Flagged pixels (ie, having the value !healpix.bad_value) are left unchanged, unless /FILL_HOLES is set.


KEYWORDS


/ARCMIN
If set, Radius is in arcmin rather than radians

/DEG
If set, Radius is in degrees rather than radians

/FILL_HOLES
If set, flagged pixels are replaced with the median of the valid pixels found within a distance Radius. If there are any.

/NESTED
Same as ORDERING='NESTED'

ORDERING=
Healpix map ordering, should be either 'RING' or 'NESTED'. Only applies to 'online' usage.

/RING
Same as ORDERING='RING'


DESCRIPTION


median_filter allows the median filtering of a Healpix map. Each pixel of the output map is the median value of the input map pixels found within a disc of given radius centered on that pixel. Flagged pixels can be either left unchanged or 'filled in' with that same scheme.
If the map is polarized, each of the three Stokes components is filtered separately.
The input and output can either be arrays or FITS files, but they to be both arrays or both FITS files.


RELATED ROUTINES

This section lists the routines related to median_filter


idl
version 6.1 or more is necessary to run median_filter


EXAMPLE:

median_filter ('map.fits', 10., /arcmin, 'med.fits')

Writes in 'med.fits' the median filtered map of 'map.fits' using a disc radius of 10 arcmin


EXAMPLE:

map = randomn(seed, nside2npix(256))
median_filter (map, 0.5, /deg, med)

Returns in med the median filtered map of map using a disc radius of 0.5 degrees

Eric Hivon 2010-06-18
Privacy / Copyright
FIRST GOV Contact: NASA Home Page Site Manager:
Webmaster:

CL 03-2650