SMOOTHMAP
WARNING:
This function has been deprecated, and replaced by SKYMAP_SMOOTH. I
recommend using that function instead of this one.
Name
SMOOTHMAP
Purpose
This procuedure creates a smoothed map of some quantity sampled,
with uncertainty, at irregualr points across the sky. It uses a
gaussian smoothing filter to average nearby data points and improve
noise statistics. The algorithm is taken from Lombardi and Alves
2001. This implementation was written to generate Av maps from the
output of the NICER algorithm (also described in Lombardi and Alves
2001, and implemented in the procedure NICER.pro)
Calling Sequence
SMOOTHMAP, val, err, x, y, map, errmap, ctmap, head,
[cdelt = cdelt, fwhm = fwhm, out = out, /CLIP,
/GALACTIC, /CARTESIAN, /VERBOSE, /ITERATE]
Inputs
val: The sampled values to smooth over
err: The uncertainties on the sampled errors (sqrt(variance))
x: The x position of the sampled values (treated as a spherical
coordinate in DEGREES)
y: The y position of the sampled values (treated as a spherical
coordiante in DEGREES)
;
Keyword Parameters
cdelt: A scalar defining the pixel size of the map in
DEGREES. If not defined, cdelt will be set to fwhm / 2.
fwhm: The FWHM of the smoothing kernel, in DEGREES. If not
supplied, the fwhm will be set so that, on average, a 1 fwhm
diameter circle surrounds 50 datapoints.
out: Write a FITS file of the results. The output files will be
named out_map.fits, out_err.fits, and out_ct.fits.
CLIP: If set, the procedure will iterate and reject outlier data
points.
GALACTIC: If set, the coordinates are assumed to be in galactic
coordinates. This does not affect the map calculation, but does
impact the header file. If not set, the FK5 system is
assumed.
CARTESIAN: If set, the input and output are in a cartesian
(non-spherical) coordinate system
VERBOSE: If set, information about the procedure is printed to the terminal.
ITERATE: Used internally for the sigma clipping process. Do not set
this manually.
Optional Outputs
map: A variable to hold the smoothed map
errmap: A variable to hold the error (sqrt(variance)) on the smoothed map
ctmap: A variable to hold the map giving the number of sources
which went into the calculation of each pixel
head: A variable to hold the header of the map (A string array)
Restrictions
For pathological cases (sampled points straddle the poles or l=360
deg line), the map dimensions will be calculated incorrectly.
Category
image processing
Modification History
November 2008: Written by Chris Beaumont based on code by Jon
Swift. Written to independently reproduce and
speed up that code.
December 1 2008: Fixed several bugs in error calculation. cnb.
December 4 2008: Fixed things so NANs in the input val variable
are ignored. cnb.
April 15 2009: Added CARTESIAN keyword
March 2010: Deprecated and replaced by skymap_smooth. cnb.