median_filter

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 


FORMAT

% median_filter [options] [parameter_file]


COMMAND LINE OPTIONS

-d
--double
double precision mode (see Notes on double/single precision modes)
-s
--single
single precision mode (default)


QUALIFIERS

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_{\mathrm{pix}}$ where $\theta_{\mathrm{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


DESCRIPTION

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.


SUPPORT

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

anafast
This HEALPix Fortran facility can analyse a HEALPix map.
synfast
This HEALPix facility can generate a HEALPix map from a power spectrum $C_\ell$.


EXAMPLE # 1:

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


EXAMPLE # 2:

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
fill_holes
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'.


RELEASE NOTES

■ Initial release (HEALPix 2.00)


MESSAGES

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.82, 2022-07-28