AST_UKERN1

1-dimensional sub-pixel interpolation kernel

Description:

This is a fictitious routine which does not actually exist. Instead, this description constitutes a template so that you may implement a routine with this interface for yourself (and give it any name you wish). Such a routine may be passed via the FINTERP argument of the AST_RESAMPLE <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 argument of AST_RESAMPLE <X > to the value AST__UKERN1). This allows you to use your own interpolation kernel in addition to those which are pre-defined.

The routine 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.

Invocation

CALL AST_UKERN1( OFFSET, PARAMS, FLAGS, VALUE, STATUS )

Arguments

OFFSET = DOUBLE PRECISION (Given)
This will be the offset of the pixel from the interpolation point, measured in pixels. This value may be positive or negative, but for most practical interpolation schemes its sign should be ignored.
PARAMS( ) = DOUBLE PRECISION (Given)
This will be the same array as was given via the PARAMS argument of AST_RESAMPLE <X >. You may use this to pass any additional parameter values required by your kernel, but note that PARAMS(1) will already have been used to specify the number of neighbouring pixels which contribute to the interpolated value.
FLAGS = INTEGER (Given)
This will be the same value as was given via the FLAGS argument of AST_RESAMPLE <X >. You may test this value to provide additional control over the operation of your routine. 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 AST_RESAMPLE <X >).
VALUE = DOUBLE PRECISION (Returned)
The calculated kernel value, which may be positive or negative.
STATUS = INTEGER (Given and Returned)
The global status.

Notes: