flexinterpn_method
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | flexinterpn_method [2010/06/21 05:23] (current) – created jochen | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== flexinterpn_method ====== | ||
| + | This is a proxy function for [[flexinterpn]]. It only handles some standard kernels as well as 2D to 3D data conversion for rotation. | ||
| + | |||
| + | ===== Motivation ===== | ||
| + | While the [[flexinterpn]] function allows very flexible interpolation of data, it would be too cumbersome to expect that every user (including myself) will create a suitable kernel window over and over again whenever data is to be interpolated. | ||
| + | |||
| + | The flexinterpn_method function creates a persistent variable and stores some of the more standard kernel windows in a 4096-sampling resolution (enough to allow the linear interpolation internally applied by [[flexinterpn]] to yield high-quality results, tested with the Lanczos8 window mentioned at the [[http:// | ||
| + | |||
| + | ===== Function reference ('help flexinterpn_method' | ||
| + | < | ||
| + | |||
| + | FORMAT: | ||
| + | |||
| + | Input fields: | ||
| + | |||
| + | data N-d data (up to 4 dims supported) | ||
| + | cr CxD coordinates or 4xD range | ||
| + | opts hold (and tranformation matrix) | ||
| + | method | ||
| + | ' | ||
| + | ' | ||
| + | |||
| + | Output fields: | ||
| + | |||
| + | idata | ||
| + | k | ||
| + | |||
| + | Note: the range notation of cr must contain Infs in the first row | ||
| + | of values, the rest is parsed as row2: | ||
| + | |||
| + | Note: for methods other than nearest and linear, the value range of | ||
| + | the input can be exceeded!</ | ||
| + | |||
| + | ===== Arguments ===== | ||
| + | The first two arguments, '' | ||
| + | |||
| + | ==== opts ==== | ||
| + | Here, neither, the first, or both of the last two arguments of [[flexinterpn]] can be given (so, possibly, neither '' | ||
| + | |||
| + | ==== method ==== | ||
| + | The following methods (kernel shapes) are supported: | ||
| + | * cubic (hermite cubic spline, see bottom of the [[http:// | ||
| + | * lanczos2/3 (same information source) | ||
| + | * linear (standard kernel, '' | ||
| + | * nearest (this is only an approximation! for very few interpolation coordinate, the value will yet be a linear interpolation, | ||
| + | * poly3/ | ||
| + | |||
| + | ===== Usage ===== | ||
| + | There are two main uses of this function: | ||
| + | |||
| + | * actual data interpolation (passing on data to [[flexinterpn]]): | ||
| + | resampled = flexinterpn_method(data, | ||
| + | * generating/ | ||
| + | [null, k] = flexinterpn_method(1, | ||
flexinterpn_method.txt · Last modified: 2010/06/21 05:23 by jochen
