Programming Reference for VirtualLab Fusion  2025.1
Loading...
Searching...
No Matches
ComplexFieldPointInterpolation Class Reference

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
ComplexFieldPointInterpolation is a class with static members that are able to interpolated pointwise between different sampling points of a ComplexField. Additionally a non static-optimized version is supported for most interpolation methods. These functions are optimized for an interpolation on an equidistant grid. Different interpolation methods are supported. For more information see [Lehmann1999]. More...

Public Member Functions

 ComplexFieldPointInterpolation ()
 Default constructor for all optimized interpolations.
 
Complex Cubic4PointInterpolationOpt (ComplexField cf, double coord_x, double coord_y, ExtrapolationInfo extrapolation)
 Performs an optimized cubic 4 point interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 4 neighbour points. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1. The interpolation is optimized for interpolations that work row by row and from the left sampling point to the right sampling point.
 
Complex Cubic6PointInterpolationOpt (ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
 Performs an optimized cubic 6 point interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 6 neighbour points. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1. The interpolation is optimized for interpolations that work row by row and from the left sampling point to the right sampling point.
 
Complex Cubic8PointInterpolationOpt (ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
 Performs an optimized cubic 8 point interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 8 neighbouring points. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1. The interpolation is optimized for interpolations that work row by row and from the left sampling point to the right sampling point.
 
Complex InterpolationMethodDelegate (ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
 Delegate for the complex field point interpolation methods of this class.
 
Complex InterpolationOpt (ComplexField cf, VectorD point, InterpolationMethod interpolationMethod, ExtrapolationInfo extrapolation)
 Performs an interpolation of a ComplexField on a specific point (x,y) using the specified interpolation method. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1. The interpolation is optimized for interpolations that work row by row and from the left sampling point to the right sampling point.
 
void ReInitialize ()
 Deletes all temporarily stored interpolation data. Use this function if you plan to interpolate a different ComplexField with the same interpolation method. Not reinitialzing the interpolation object can case numerical errors in such cases.
 
Complex SincInterpolationOpt (ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
 Performs a sinc interpolation of a ComplexField on a specific point (x,y). The interpolation is done by adding the sinc-functions of every pixel of the field. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1. The interpolation is optimized for interpolations that work row by row and from the left sampling point to the right sampling point.
 
Complex TruncatedSincInterpolationOpt (ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
 Performs a truncated sinc interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 6 neighbour points. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1. The interpolation is optimized for interpolations that work row by row and from the left sampling point to the right sampling point.
 

Static Public Member Functions

static Complex Cubic4PointInterpolation (ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
 Performs a cubic 4 point interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 4 neighbour points. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.
 
static double Cubic4PointInterpolationKernel (double dx)
 This function calculates the one-dimensional interpolation kernel of the cubic 4 point interpolation.
 
static Complex Cubic6PointInterpolation (ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
 Performs a cubic 6 point interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 6 neighbour points. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.
 
static Complex Cubic6PointInterpolationWithDerivatives (ComplexField cf, VectorD point, ExtrapolationInfo extrapolation, out Complex derivX, out Complex derivY)
 Performs a cubic 6 point interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 6 neighboring points. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.
 
static Complex Cubic8PointInterpolation (ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
 Performs a cubic 8 point interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 4 neighbour points. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.
 
static Complex Interpolation (ComplexField cf, VectorD point, InterpolationMethod interpolationMethod, bool periodicExtrapolation)
 Performs a interpolation of a ComplexField on a specific point (x,y) using the specified interpolation method. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.
 
static Complex Interpolation (ComplexField cf, VectorD point, InterpolationMethod interpolationMethod, ExtrapolationInfo extrapolation)
 Performs a interpolation of a ComplexField on a specific point (x,y) using the specified interpolation method. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.
 
static Complex LinearInterpolation (ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
 Performs a linear interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 4 neighbour points. The function interpolates the phase by interpolating real and imaginary part of the points. The amplitude is interpolated separately. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.
 
static Complex LinearInterpolation_RealAndImaginaryPart (ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
 Performs a linear interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 4 neighbour points. The function interpolates the real and the imaginary part. There is no separate interpolation of amplitude and phase!
 
static Complex LinearInterpolationPhysical (ComplexField cf, VectorD samplingDistance, VectorD point, ExtrapolationInfo extrapolation, bool interpolatePhaseAndAmplitude)
 Performs a linear interpolation of a ComplexField on a specific physical coordinate (x,y). The interpolation is done between 4 neighbor points. The function interpolates the phase by interpolating real and imaginary part of the points. The amplitude is interpolated separately. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.
 
static Complex NearestNeighbourInterpolation (ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
 Nearest neighbour interpolation of a ComplexField on a specific point (x,y). The interpolation is looking for the nearest neighbour pixel and return its value. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.
 
static Complex SincInterpolation (ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
 Performs a sinc interpolation of a ComplexField on a specific point (x,y). The interpolation is done by adding the sinc-functions of every pixel of the field. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.
 
static Complex TruncatedSincInterpolation (ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
 Performs a truncated sinc interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 6 neighbour points. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.
 

Detailed Description

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
ComplexFieldPointInterpolation is a class with static members that are able to interpolated pointwise between different sampling points of a ComplexField. Additionally a non static-optimized version is supported for most interpolation methods. These functions are optimized for an interpolation on an equidistant grid. Different interpolation methods are supported. For more information see [Lehmann1999].

Member Function Documentation

◆ Cubic4PointInterpolation()

static Complex Cubic4PointInterpolation ( ComplexField  cf,
VectorD  point,
ExtrapolationInfo  extrapolation 
)
static

Performs a cubic 4 point interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 4 neighbour points. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.

Parameters
cfComplexField.
pointPosition to interpolate.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
Result of operation.

◆ Cubic4PointInterpolationKernel()

static double Cubic4PointInterpolationKernel ( double  dx)
static

This function calculates the one-dimensional interpolation kernel of the cubic 4 point interpolation.

Parameters
dxDistance from the interpolation point in pixels.
Returns
Result of operation.

◆ Cubic4PointInterpolationOpt()

Complex Cubic4PointInterpolationOpt ( ComplexField  cf,
double  coord_x,
double  coord_y,
ExtrapolationInfo  extrapolation 
)

Performs an optimized cubic 4 point interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 4 neighbour points. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1. The interpolation is optimized for interpolations that work row by row and from the left sampling point to the right sampling point.

Parameters
cfComplexField.
coord_xX coordinate of the position to interpolate for
coord_yY coordinate of the position to interpolate for
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
Result of operation.

◆ Cubic6PointInterpolation()

static Complex Cubic6PointInterpolation ( ComplexField  cf,
VectorD  point,
ExtrapolationInfo  extrapolation 
)
static

Performs a cubic 6 point interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 6 neighbour points. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.

Parameters
cfComplexField for interpolation.
pointPosition to interpolate.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
Result of operation.

◆ Cubic6PointInterpolationOpt()

Complex Cubic6PointInterpolationOpt ( ComplexField  cf,
VectorD  point,
ExtrapolationInfo  extrapolation 
)

Performs an optimized cubic 6 point interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 6 neighbour points. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1. The interpolation is optimized for interpolations that work row by row and from the left sampling point to the right sampling point.

Parameters
cfComplexField.
pointPosition to interpolate.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
Result of operation.

◆ Cubic6PointInterpolationWithDerivatives()

static Complex Cubic6PointInterpolationWithDerivatives ( ComplexField  cf,
VectorD  point,
ExtrapolationInfo  extrapolation,
out Complex  derivX,
out Complex  derivY 
)
static

Performs a cubic 6 point interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 6 neighboring points. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.

Parameters
cfComplexField for interpolation.
pointPosition to interpolate.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
derivXOut parameter giving the derivative in x-direction.
derivYOut parameter giving the derivative in y-direction.
Returns
Result of operation.

◆ Cubic8PointInterpolation()

static Complex Cubic8PointInterpolation ( ComplexField  cf,
VectorD  point,
ExtrapolationInfo  extrapolation 
)
static

Performs a cubic 8 point interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 4 neighbour points. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.

Parameters
cfComplexField for interpolation.
pointPosition to interpolate.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
Result of operation.

◆ Cubic8PointInterpolationOpt()

Complex Cubic8PointInterpolationOpt ( ComplexField  cf,
VectorD  point,
ExtrapolationInfo  extrapolation 
)

Performs an optimized cubic 8 point interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 8 neighbouring points. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1. The interpolation is optimized for interpolations that work row by row and from the left sampling point to the right sampling point.

Parameters
cfComplexField.
pointPosition to interpolate.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
Result of operation.

◆ Interpolation() [1/2]

static Complex Interpolation ( ComplexField  cf,
VectorD  point,
InterpolationMethod  interpolationMethod,
bool  periodicExtrapolation 
)
static

Performs a interpolation of a ComplexField on a specific point (x,y) using the specified interpolation method. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.

Parameters
cfComplexField for interpolation.
pointPosition to interpolate.
interpolationMethodInterpolation method.
periodicExtrapolationIf true, the part will be treated as periodic outside the actual definition area. Otherwise the outer range will be assumed to be constant zero.
Returns
Value of the given ComplexField, interpolated at the given point.

◆ Interpolation() [2/2]

static Complex Interpolation ( ComplexField  cf,
VectorD  point,
InterpolationMethod  interpolationMethod,
ExtrapolationInfo  extrapolation 
)
static

Performs a interpolation of a ComplexField on a specific point (x,y) using the specified interpolation method. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.

Parameters
cfComplexField for interpolation.
pointPosition to interpolate.
interpolationMethodInterpolation method.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
Result of operation.
Exceptions
System.ArgumentExceptionInterpolation method not supported.

◆ InterpolationMethodDelegate()

Complex InterpolationMethodDelegate ( ComplexField  cf,
VectorD  point,
ExtrapolationInfo  extrapolation 
)

Delegate for the complex field point interpolation methods of this class.

Parameters
cf
point
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns

◆ InterpolationOpt()

Complex InterpolationOpt ( ComplexField  cf,
VectorD  point,
InterpolationMethod  interpolationMethod,
ExtrapolationInfo  extrapolation 
)

Performs an interpolation of a ComplexField on a specific point (x,y) using the specified interpolation method. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1. The interpolation is optimized for interpolations that work row by row and from the left sampling point to the right sampling point.

Parameters
cfComplexField for interpolation.
pointPosition to interpolate.
interpolationMethodInterpolation method.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
Result of operation.

◆ LinearInterpolation()

static Complex LinearInterpolation ( ComplexField  cf,
VectorD  point,
ExtrapolationInfo  extrapolation 
)
static

Performs a linear interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 4 neighbour points. The function interpolates the phase by interpolating real and imaginary part of the points. The amplitude is interpolated separately. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.

Parameters
cfComplexField to interpolate.
pointPosition to interpolate.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
Result of operation.

◆ LinearInterpolation_RealAndImaginaryPart()

static Complex LinearInterpolation_RealAndImaginaryPart ( ComplexField  cf,
VectorD  point,
ExtrapolationInfo  extrapolation 
)
static

Performs a linear interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 4 neighbour points. The function interpolates the real and the imaginary part. There is no separate interpolation of amplitude and phase!

Parameters
cfComplexField to interpolate.
pointPosition to interpolate.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
Result of operation.

◆ LinearInterpolationPhysical()

static Complex LinearInterpolationPhysical ( ComplexField  cf,
VectorD  samplingDistance,
VectorD  point,
ExtrapolationInfo  extrapolation,
bool  interpolatePhaseAndAmplitude 
)
static

Performs a linear interpolation of a ComplexField on a specific physical coordinate (x,y). The interpolation is done between 4 neighbor points. The function interpolates the phase by interpolating real and imaginary part of the points. The amplitude is interpolated separately. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.

Parameters
cfComplexField to interpolate.
samplingDistanceThe sampling distance of the field.
pointPhysical position to interpolate.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
interpolatePhaseAndAmplitudeIf true, phase and amplitude is interpolated at point. if false, real part and imaginary part is interpolated at point.
Returns
Result of operation.

◆ NearestNeighbourInterpolation()

static Complex NearestNeighbourInterpolation ( ComplexField  cf,
VectorD  point,
ExtrapolationInfo  extrapolation 
)
static

Nearest neighbour interpolation of a ComplexField on a specific point (x,y). The interpolation is looking for the nearest neighbour pixel and return its value. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.

Parameters
cfComplexField to interpolate.
pointPosition to interpolate.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
Result of operation.

◆ SincInterpolation()

static Complex SincInterpolation ( ComplexField  cf,
VectorD  point,
ExtrapolationInfo  extrapolation 
)
static

Performs a sinc interpolation of a ComplexField on a specific point (x,y). The interpolation is done by adding the sinc-functions of every pixel of the field. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.

Parameters
cfComplexField for interpolation.
pointPosition to interpolate.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
Result of operation.

◆ SincInterpolationOpt()

Complex SincInterpolationOpt ( ComplexField  cf,
VectorD  point,
ExtrapolationInfo  extrapolation 
)

Performs a sinc interpolation of a ComplexField on a specific point (x,y). The interpolation is done by adding the sinc-functions of every pixel of the field. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1. The interpolation is optimized for interpolations that work row by row and from the left sampling point to the right sampling point.

Parameters
cfComplexField to interpolate.
pointPosition to interpolate.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
Result of operation.

◆ TruncatedSincInterpolation()

static Complex TruncatedSincInterpolation ( ComplexField  cf,
VectorD  point,
ExtrapolationInfo  extrapolation 
)
static

Performs a truncated sinc interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 6 neighbour points. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.

Parameters
cfComplexField for interpolation.
pointPosition to interpolate.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
Result of operation.

◆ TruncatedSincInterpolationOpt()

Complex TruncatedSincInterpolationOpt ( ComplexField  cf,
VectorD  point,
ExtrapolationInfo  extrapolation 
)

Performs a truncated sinc interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 6 neighbour points. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1. The interpolation is optimized for interpolations that work row by row and from the left sampling point to the right sampling point.

Parameters
cfComplexField.
pointPosition to interpolate.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
Result of operation.