InterpScheme class methods and supporting functions.
More...
#include <complex>
#include "input_flags.h"
Go to the source code of this file.
|
enum | scheme_value {
BAND_LIMITED_0 = 4
, BAND_LIMITED_1 = 6
, BAND_LIMITED_2 = 8
, BAND_LIMITED_3 = 9
,
BAND_LIMITED_4 = 7
, BAND_LIMITED_5 = 5
, BAND_LIMITED_6 = 3
, BAND_LIMITED_7 = 2
,
BAND_LIMITED_CELL_ZERO = 1
, CUBIC_INTERP_MIDDLE
, CUBIC_INTERP_FIRST
, CUBIC_INTERP_LAST = -2
} |
| Defines our order of preference for the use of the various schemes. More...
|
|
|
const InterpolationScheme & | best_scheme (int datapts_in_direction, int interpolation_position, tdms_flags::InterpolationMethod interpolation_methods=tdms_flags::InterpolationMethod::Cubic) |
| Determine the appropriate interpolation scheme to use, given the number of datapoints available and the position to which we wish to interpolate to.
|
|
InterpScheme class methods and supporting functions.
- Author
- William Graham (ccaeg.nosp@m.ra@u.nosp@m.cl.ac.nosp@m..uk)
Non InterpScheme methods are required to preserve functionality whilst testing new schemes
◆ scheme_value
Defines our order of preference for the use of the various schemes.
There should never be an instance in which we wish to use BLi to position 7 - this will take us to a point OUTSIDE the computational domain. However for completion purposes (and if we find a use for it), it is included.
MODIFICATIONS TO THE ALIASED INTS WILL CHANGE THE ORDER OF SCHEME PREFERENCE!
For bandlimited schemes, we have 8 equidistant datapoints and can interpolate to the midpoint of any pair of consecutive points, or "half a
point spacing" to the right of the final data point. These "interpolation
positions" (interp positions) are marked with "o" below: v0 v1 v2 v3 v4 v5 v6 v7 o o o o o o o o We label these interp positions with the index of the point to the left: a data point at interp position 0 is effectively a data point "v0.5", being at the midpoint of v0 and v1, for example.
◆ best_scheme()
Determine the appropriate interpolation scheme to use, given the number of datapoints available and the position to which we wish to interpolate to.
- Parameters
-
datapts_in_direction | The number of datapoints available along this axis |
interpolation_position | Interpolation is to be performed to the midpoint of the datapoints indexed with (interpolation_position-1) and (interpolation_position) |
interpolation_methods | The preferred interpolation methods to use |
- Returns
- const InterpolationScheme&
◆ BL0
Initial value:
BAND_LIMITED_0)
Executes an interpolation scheme.
Definition interpolation_methods.h:57
◆ BL1
◆ BL2
◆ BL3
◆ BL4
◆ BL5
◆ BL6
◆ BL7
◆ BL_TO_CELL_0
◆ CBFst
◆ CBLst
◆ CBMid