This program produces the median filtered map of an input HEALPix map (polarised or unpolarised). The neighborhood on the which the median is computed is defined as a disk of user-defined radius

Location in HEALPix directory tree: src/f90/median_filter/median_filter.f90 


% median_filter [options] [parameter_file]


double precision mode (see Notes on double/single precision modes on page [*])
single precision mode (default)


simul_type =
Either 1 or 2. If set to 1, only the temperature component of the input map will be filtered. If set to 2, all the Stokes components available in the input file will be filtered (default = 1)
infile =
Name of the FITS file containing the map to be filtered (default = '', no default input file).
mf_radius_arcmin =
Radius in arcmin of the disk over which the median is computed (default = $3\theta_{\rm pix}$ where $\theta_{\rm pix}$ is the input map pixel size).
fill_holes =
If set to true, flagged pixels take for value the median of the valid pixels surrounding them (if any). Otherwise they are left unchanged. (default = .false.). Note that y, yes,t, true, .true. and 1 are interpreted as true, while n, no, f, false, .false. and 0 stand for false.
mffile =
Name of the FITS file containing the median filtered map


Median_Filter produces a median filtered map in which the value of each pixel is the median of the input map valid pixels found within a disk of given radius centered on that pixel. A pixel flagged as 'non-valid' in the input map can either be left unchanged or 'filled in' with the same scheme, if at least one valid pixel is found among its neighbors.
If the map is polarized, each of the three Stokes components is filtered separately.


This section lists those routines and facilities (including those external to the HEALPix distribution) which can assist in the utilisation of median_filter.

This HEALPix Fortran facility can analyse a HEALPix map.
This HEALPix facility can generate a HEALPix map from a power spectrum Cl.


median_filter [option]
Median_Filter runs in interactive mode, self-explanatory.


median_filter [option] filename
When 'filename' is present, median_filter enters the non-interactive mode and parses its inputs from the file 'filename'. This has the following structure: the first entry is a qualifier which announces to the parser which input immediately follows. If this input is omitted in the input file, the parser assumes the default value. If the equality sign is omitted, then the parser ignores the entry. In this way comments may also be included in the file. In this example, the file contains the following qualifiers:
simul_type= 1
infile= map.fits
mf_radius_arcmin= 20.0
mffile= med.fits

Median_Filter reads the sky map from 'map.fits'. Since
has its default value, ..., The median will be computed on a disk of 20 arcmin in radius, and the result will be written in 'med.fits'.


* Initial release (HEALPix 2.00)


This section describes error messages generated by median_filter

Message Severity Text
can not allocate memory for array xxx Fatal You do not have sufficient system resources to run this facility at the map resolution you required. Try a lower map resolution.

this is not a binary table

the fitsfile you have specified is not of the proper format
there are undefined values in the table! the fitsfile you have specified is not of the proper format
the header in xxx is too long the fitsfile you have specified is not of the proper format
XXX-keyword not found the fitsfile you have specified is not of the proper format
found xxx in the file, expected:yyyy the specified fitsfile does not contain the proper amount of data.

Version 3.31, 2017-01-06