SCULIB_WTFN_REGRID_2

Perform convolution

Description:

This routine convolves the input data with a weighting function onto a regularly spaced output grid. The weighting function is stored in a lookup table indexed by the square of the distance and is parametrized by RES, WEIGHTSIZE, SCLSZ and WTFN.

This is an image space implementation of fourier techniques. In Fourier terms the technique could be described as follows:-

The analogue of these process steps in image space is as follows:

If the method is done properly, the rebinned map is in fact the map on the new sample mesh that has the same FT as the continuous function going through the original sample points.

Convolution Functions:-

Invocation

CALL SCULIB_WTFN_REGRID_2 (RES, IN_DATA, IN_VARIANCE, WEIGHT, USEVARWT, VARWT, X, Y, NPIX, PIXSPACE, NI, NJ, ICEN, JCEN, TOTAL_WEIGHT, WAVELENGTH, CONV_DATA_SUM, CONV_VARIANCE_SUM, CONV_WEIGHT, WEIGHTSIZE, SCLSZ, WTFN, STATUS)

Arguments

RES = INTEGER (Given)
number of resolution elements per scale length
IN_DATA (NPIX) = REAL (Given)
The input data values.
IN_VARIANCE (NPIX) = REAL (Given)
Variance on IN_DATA.
WEIGHT = REAL (Given)
The weight of this dataset.
USEVARWT = LOGICAL (Given)
Are we using a different weight for each point
VARWT (NPIX) = REAL (Given)
The different weight for each pixel
X (NPIX) = DOUBLE PRECISION (Given)
The x coordinates of the input pixels.
Y (NPIX) = DOUBLE PRECISION (Given)
The y coordinates of the input pixels.
NPIX = INTEGER (Given)
the number of input pixels.
PIXSPACE = REAL (Given)
the pixel spacing of the output map.
NI = INTEGER (Given)
The number of output pixels in the x direction.
NJ = INTEGER (Given)
The number of output pixels in the y direction.
ICEN = INTEGER (Given)
the x index of the centre of the output array.
JCEN = INTEGER (Given)
the y index of the centre of the output array.
TOTAL_WEIGHT (NI,NJ) = REAL (Given)
the ‘total weight’ of each output pixel.
WAVELENGTH = REAL (Given)
the wavelength at which the maps were made (microns).
CONV_DATA_SUM (NI,NJ) = REAL (Given and returned)
the convolution sum for each output pixel.
CONV_VARIANCE_SUM (NI,NJ) = REAL (Given and returned)
the variance convolution sum for each output pixel.
CONV_WEIGHT (NI,NJ) = REAL (Given and returned)
the convolution weight for each output pixel.
WEIGHTSIZE = INTEGER (Given)
radius of weight function in scale units (SCUIP__FILTRAD for BESSEL, 1 for LINEAR)
SCLSZ = REAL
1 scale length in the same units as PIXSPACE
WTFN (RES RES WEIGHTSIZE WEIGHTSIZE) = REAL (Given)
convolution weighting function
STATUS = INTEGER (Given and Returned)
The global status.

Copyright

Copyright ©1995,1996,1997,1998,1999 Particle Physics and Astronomy Research Council. All Rights Reserved.