The routine smooths the array A using an arbitrary smoothing kernel, and returns the result in the
array B.
CALL KPG1_AKERx( IBOX, JBOX, WEIGHT, SAMBAD, WLIM, NX, NY, BAD, VAR,
A, B, BADOUT, STATUS )
IBOX = INTEGER (Given)
Half-size, in pixels along the x
axis, of the box over which the smoothing will be applied (the actual box used has an edge which is
2IBOX1
pixels long). This defines the region within which the smoothing function is non-zero.
JBOX = INTEGER (Given)
Half-size, in pixels along the y axis, of the box over
which the smoothing will be applied (the actual box used has an edge which is
2JBOX1
pixels long). This defines the region within which the smoothing function is non-zero.
WEIGHT( 2
IBOX
1, 2
JBOX
1 ) = ?
(Given)
The weighting kernel. It need not be normalised to one, but this is strongly preferred since it
reduces the chance of overflows.
SAMBAD = LOGICAL (Given)
If a .TRUE. value is given, then
any "
bad"
pixels in the input array A will be propagated to the output array B (output values
will be calculated for all other output pixels). If a .FALSE. value is given, then the WLIM
argument is used to determine which output pixels will be bad (if any). This argument is
not relevant if BAD is .FALSE..
WLIM = ? (Given)
The minimum weighting that can
be used to compute a smoothed output pixel if SAMBAD is .FALSE.. Any output pixels
falling short of the specified weight will be set to the bad value (invalid pixels carry no
weight, others have Gaussian weights about the central pixel). The value must be greater
than 0.0 and should be less than or equal to 1.0. This argument is not used if SAMBAD is
.TRUE. or if BAD is .FALSE..
NX = INTEGER (Given)
First dimension of the 2-d array
A.
NY = INTEGER (Given)
Second dimension of the 2-d array A.
BAD = LOGICAL
(Given)
Whether it is necessary to check for bad pixels in the input array A.
VAR =
LOGICAL (Given)
If a .FALSE. value is given for this argument, then smoothing will be
performed as if the array supplied (A) is an array of data and the PSF will be used directly as
specified. If a .TRUE. value is given, then smoothing will be applied as if the array is an array
of variance values associated with an array of data; in this case, the effective PSF will be
reduced in width by a factor 2 and the mean output values will be reduced to reflect the
variance-reducing effect of smoothing.
A( NX, NY ) = ? (Given)
Array containing the input image
to be smoothed.
B( NX, NY ) = ? (Returned)
Array containing the input image after
smoothing.
BADOUT = LOGICAL (Returned)
Whether there are bad pixel values in the
output array.
STATUS = INTEGER (Given and Returned)
The global status.