## ./

# skymap_smooth.pro

## Routines

`skymap_smooth, map, x, y, val, dval [, fwhm=fwhm] [, truncate=truncate] [, emap=emap], weight=weight`

This procedure creates a smoothed map of some function on the sky, sampled at discrete points.

`test`

## Routine details

## topskymap_smooth

`skymap_smooth, map, x, y, val, dval [, fwhm=fwhm] [, truncate=truncate] [, emap=emap], weight=weight`

This procedure creates a smoothed map of some function on the sky, sampled at discrete points. It relies on adxy and gcirc from the IDL astronomy user's library to handle all of the hard spherical geometry stuff.

This function uses weighted mean smoothing with a Gaussian smoothing kernel.

V(x,y) = sum(w_i * val_i) / sum(w_i) where w_i = 1/dval_i^2 * exp[-((x-x_i)^2 + (y-y_i)^2) / 2 sigma^2] w_i truncated to 0 at (x - x_i)^2 + (y - y_i)^2 > truncate^2

The variance map is given by dV(x,y) = sum(w_i * dval_i^2) / sum(w_i)^2 In other words, it is the interpolated value of the variance, divided by the "effective" number of points which contribute to each pixel.

The procedure only calculates weights out to the truncation radius to speed things up. The procedure takes O(stamp_size * n_data) operations, instead of O(map_size * n_data).

### Parameters

- map in required
A blank map and fits header. Use map_init.pro to create this structure.

- x in required
The x location (sky coordinates in degrees) of the data

- y in required
The y location (sky coordinates in degrees) of the data

- val in required
The value at each (x,y) point

- dval in required
The 1-sigma error at each point.

### Keywords

- fwhm in optional
The fwhm of the smoothing kernel, in degrees. Defaults to 1/100 of the map size

- truncate in optional
The radius at which to truncate the smoothing. This can considerably speed up execution time. See PROCEDURE for details. Defaults to 2 * fwhm.

- emap in optional
Set to a named variable to hold the estimated variance map.

- weight

### Author information

- History:
March 2010: Written by Chris Beaumont. Meant to replace SMOOTHMAP.pro. Dec 2010: Added /SAMPLE to REBIN calls. cnb.

## toptest

`test`

## File attributes

Modifcation date: | Fri Dec 10 16:30:56 2010 |

Lines: | 232 |