1-dimensional sub-pixel interpolation kernel
"
finterp"
parameter of the
astResample$<$X$>$
functions (q.v.) in order to supply a 1-dimensional interpolation
kernel to the algorithm which performs sub-pixel interpolation during
resampling of gridded data (you must also set the "
interp"
parameter of
astResample$<$X$>$
to the value AST__UKERN1). This allows you to use your own interpolation kernel in
addition to those which are pre-defined.
The function calculates the value of a 1-dimensional sub-pixel interpolation kernel.
This determines how the weight given to neighbouring pixels in calculating
an interpolated value depends on the pixel’
s offset from the interpolation
point. In more than one dimension, the weight assigned to a pixel is formed by
evaluating this 1-dimensional kernel using the offset along each dimension in
turn. The product of the returned values is then used as the pixel weight.
"
params"
parameter of
astResample$<$X$>$.
You may use this to pass any additional parameter values required by your kernel,
but note that "
params[0]"
will already have been used to specify the number
of neighbouring pixels which contribute to the interpolated value. "
flags"
parameter of
astResample$<$X$>$.
You may test this value to provide additional control over the operation of your function.
Note that the special flag values AST__URESAMP1, 2, 3 & 4 are reserved for you to use
for your own purposes and will not clash with other pre-defined flag values (see
astResample$<$X$>$).
Not all functions make good interpolation kernels. In general, acceptable kernels tend to be symmetrical about zero, to have a positive peak (usually unity) at zero, and to evaluate to zero whenever the pixel offset has any other integral value (this ensures that the interpolated values pass through the original data). An interpolation kernel may or may not have regions with negative values. You should consult a good book on image processing for more details.
If an error occurs within this function, it should use astSetStatus to set the AST error status to an error value. This will cause an immediate return from astResample$<$X$>$. The error value AST__UK1ER is available for this purpose, but other values may also be used (e.g. if you wish to distinguish different types of error).