High-Resolution Interpolation Routines

In many cases, memory space can be saved by using a less accurate representation for the data values (below: "normal" type), but calculating the interpolation value with high accuracy (below: "double precision" type). This demand requires a change to the interpolation calculation.

For this purpose, ASCET offers high-resolution interpolation routines.

Any interpolation routine can be used as high-resolution routine by activating the Double Precision option in the ASCET options window, "Build\Interpolation Routine\<routine name>" node.

If Double Precision is activated for a given interpolation routine, the result types of the functions getAt*, getAtFixed*, interpol*, interpolGroup* (*=1 for characteristic lines, *=2 for characteristic maps) are changed; they use an implementation type of "double-precision" and a different formula.

"normal" type

"double precision" type

scaling factor

sint8

sint16

256

uint8

uint16

256

sint16

sint32

65536

uint16

uint32

65536

real32

real64

1

Note

For sint32, uint32, and real64, double precision is not possible; an error of type MMdl609 is issued.

If a value type has the implementation range [lower, upper] and the formula f(phys) = offset + scaling*phys, then the "double-precision" implementation range is calculated by [lower*scaling_factor, upper*scaling_factor], and the "double-precision" formula is given by f(phys) = offset*scaling_factor + scaling*phys*scaling_factor.

The interpolation calculation of a characteristic line changes from

y = (x-x0)*(y1-y0) / (x1-x0)

to

y = ((x-x0)*(y1-y0)*scaling_factor) / (x1-x0);

The calculation for a characteristic map changes accordingly.

See also

Interpolation Routines