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

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
This class contains static member function to interpolate a ComplexField to another sampling grid. More...

Static Public Member Functions

static ComplexField CombinedInterpolation (ComplexField cf, SamplingParameters samplingParameters, VectorD zeroPoint, ExtrapolationInfo extrapolation)
 Uses the windowed sinc interpolation and the cubic 4 point interpolation to interpolate a ComplexField. In general windowed sinc interpolation with 10 border pixels is used. Is the interpolated field is narrower than 3 sampling points (in on direction) the cubic 4 point interpolation is used.
 
static ComplexField Cubic4PointInterpolation (ComplexField cf, SamplingParameters samplingParameters, VectorD zeroPoint, ExtrapolationInfo extrapolation)
 Interpolates a ComplexField using the cubic 4 point interpolation method. It is possible to interpolate a not centered part of the field using the zeroPoint parameter.
 
static ComplexField Cubic4PointInterpolation (ComplexField cf, SamplingParameters samplingParameters, VectorD zeroPoint, ExtrapolationInfo extrapolation, bool dontGiveNegativeValuesInRealPart)
 Interpolates a ComplexField using the cubic 4 point interpolation method. It is possible to interpolate a not centered part of the field using the zeroPoint parameter.
 
static ComplexField Cubic6PointInterpolation (ComplexField cf, SamplingParameters samplingParameters, VectorD zeroPoint, ExtrapolationInfo extrapolation)
 Interpolates a ComplexField using the cubic 6 point interpolation method. It is possible to interpolate a not centered part of the ComplexField using the zeroPoint parameter.
 
static ComplexField Cubic8PointInterpolation (ComplexField cf, SamplingParameters samplingParameters, VectorD zeroPoint, ExtrapolationInfo extrapolation)
 Interpolates a ComplexField using the cubic 8 point interpolation method. It is possible to interpolate a not centered part of the field using the zeroPoint parameter.
 
static ComplexField DiscreteOversampling (ComplexField field, Vector factor)
 Inserts zero points between sampling points.

 
static ComplexField Interpolation (ComplexField cf, SamplingParameters samplingParameters, VectorD zeroPoint, InterpolationMethod interpolationMethod, ExtrapolationInfo extrapolation)
 Interpolates a ComplexField using the specified interpolation method. It is possible to interpolate a not centered part of the field using the zeroPoint parameter.
 
static ComplexField LinearInterpolation (ComplexField cf, SamplingParameters samplingParameters, VectorD zeroPoint, ExtrapolationInfo extrapolation)
 Interpolates a ComplexField using the linear interpolation method. It is possible to interpolate a not centered part of the field using the zeroPoint parameter. 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.
 
static ComplexField LinearInterpolation_RealAndImaginaryPart (ComplexField cf, SamplingParameters samplingParameters, VectorD zeroPoint, ExtrapolationInfo extrapolation)
 Interpolates a ComplexField using the linear interpolation method. It is possible to interpolate a not centered part of the field using the zeroPoint parameter. The interpolation is done between 4 neighbor points. The function interpolates the real part and imaginary part of the complex values at all points separately.
 
static ComplexField NearestNeighbourInterpolation (ComplexField cf, SamplingParameters samplingParameters, VectorD zeroPoint, ExtrapolationInfo extrapolation)
 Interpolates a ComplexField using the nearest neighbor interpolation method. It is possible to interpolate a not centered part of the field using the zeroPoint parameter.
 
static ComplexField SincInterpolationFFT (ComplexField cf, SamplingParameters samplingParameters, VectorD zeroPoint)
 Interpolates a ComplexField using the sinc interpolation method by FFT. It is possible to interpolate a not centered part of the ComplexField using the zeroPoint parameter.
 
static ComplexField SincInterpolationPointwise (ComplexField cf, SamplingParameters samplingParameters, VectorD zeroPoint, ExtrapolationInfo extrapolation)
 Interpolates a ComplexField using a point-wise sinc interpolation. It is possible to interpolate a not centered part of the field using the zeroPoint parameter.
 
static ComplexField TruncatedSincInterpolation (ComplexField cf, SamplingParameters samplingParameters, VectorD zeroPoint, ExtrapolationInfo extrapolation)
 Interpolates a ComplexField using the truncated sinc interpolation method. It is possible to interpolate a not centered part of the field using the zeroPoint parameter.
 
static ComplexField WindowedSincInterpolation (ComplexField cf, SamplingParameters samplingParameters, VectorD zeroPoint)
 Similar to the interpolation WindowedSincInterpolation(ComplexField cf, SamplingParameters samplingParameters, VectorD zeroPoint, int borderPixels) (see there) but with 3 border pixels.
 
static ComplexField WindowedSincInterpolation (ComplexField cf, SamplingParameters samplingParameters, VectorD zeroPoint, int borderPixels)
 In difference to standard sinc interpolation (FFT based) that always interpolates the whole ComplexField this function extracts the desired interpolation array plus the border pixels on every side. This extracted array is sinc interpolated (FFT based). Since the sinc interpolation is a global interpolation this interpolation is only an approximation. Strongest numerical errors cna be found close to the borders of the interpolated field. Decrease errors can be achieved by increasing the number of border pixels.
 

Detailed Description

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
This class contains static member function to interpolate a ComplexField to another sampling grid.

Member Function Documentation

◆ CombinedInterpolation()

static ComplexField CombinedInterpolation ( ComplexField  cf,
SamplingParameters  samplingParameters,
VectorD  zeroPoint,
ExtrapolationInfo  extrapolation 
)
static

Uses the windowed sinc interpolation and the cubic 4 point interpolation to interpolate a ComplexField. In general windowed sinc interpolation with 10 border pixels is used. Is the interpolated field is narrower than 3 sampling points (in on direction) the cubic 4 point interpolation is used.

Parameters
cfField to be interpolated.
samplingParametersContains the new number of sampling points and the sampling distance of the interpolated field relative to the sampling distance before the interpolation. A sampling distance less than 1 means a finer sampling grid. A sampling distance greater than one indicates a rougher sampling grid.
zeroPointZero position of the interpolated field in pixel coordinates. Use this parameter to interpolate non centered parts of the original field. The zero point parameter specifies the position of the center of the interpolated field and is measured in the pixel coordinates of the given field before the interpolation.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
Result of operation.

◆ Cubic4PointInterpolation() [1/2]

static ComplexField Cubic4PointInterpolation ( ComplexField  cf,
SamplingParameters  samplingParameters,
VectorD  zeroPoint,
ExtrapolationInfo  extrapolation 
)
static

Interpolates a ComplexField using the cubic 4 point interpolation method. It is possible to interpolate a not centered part of the field using the zeroPoint parameter.

Parameters
cfField to be interpolated.
samplingParametersContains the new number of sampling points and the sampling distance of the interpolated field relative to the sampling distance before the interpolation. A sampling distance less than 1 means a finer sampling grid. A sampling distance greater than one indicates a rougher sampling grid.
zeroPointZero position of the interpolated field in pixel coordinates. Use this parameter to interpolate non centered parts of the original field. The zero point parameter specifies the position of the center of the interpolated field and is measured in the pixel coordinates of the given field before the interpolation.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
Result of operation.

◆ Cubic4PointInterpolation() [2/2]

static ComplexField Cubic4PointInterpolation ( ComplexField  cf,
SamplingParameters  samplingParameters,
VectorD  zeroPoint,
ExtrapolationInfo  extrapolation,
bool  dontGiveNegativeValuesInRealPart 
)
static

Interpolates a ComplexField using the cubic 4 point interpolation method. It is possible to interpolate a not centered part of the field using the zeroPoint parameter.

Parameters
cfField to be interpolated.
samplingParametersContains the new number of sampling points and the sampling distance of the interpolated field relative to the sampling distance before the interpolation. A sampling distance less than 1 means a finer sampling grid. A sampling distance greater than one indicates a rougher sampling grid.
zeroPointZero position of the interpolated field in pixel coordinates. Use this parameter to interpolate non centered parts of the original field. The zero point parameter specifies the position of the center of the interpolated field and is measured in the pixel coordinates of the given field before the interpolation.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
dontGiveNegativeValuesInRealPartSometimes, for real valued fields, no negative interpolated values are desired. So filter that out if this flag is set to TRUE.
Returns
Result of operation.

◆ Cubic6PointInterpolation()

static ComplexField Cubic6PointInterpolation ( ComplexField  cf,
SamplingParameters  samplingParameters,
VectorD  zeroPoint,
ExtrapolationInfo  extrapolation 
)
static

Interpolates a ComplexField using the cubic 6 point interpolation method. It is possible to interpolate a not centered part of the ComplexField using the zeroPoint parameter.

Parameters
cfField to be interpolated.
samplingParametersContains the new number of sampling points and the sampling distance of the interpolated field relative to the sampling distance before the interpolation. A sampling distance less than 1 means a finer sampling grid. A sampling distance greater than one indicates a rougher sampling grid.
zeroPointZero position of the interpolated field in pixel coordinates. Use this parameter to interpolate non centered parts of the original field. The zero point parameter specifies the position of the center of the interpolated field and is measured in the pixel coordinates of the given field before the interpolation.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
Result of operation.

◆ Cubic8PointInterpolation()

static ComplexField Cubic8PointInterpolation ( ComplexField  cf,
SamplingParameters  samplingParameters,
VectorD  zeroPoint,
ExtrapolationInfo  extrapolation 
)
static

Interpolates a ComplexField using the cubic 8 point interpolation method. It is possible to interpolate a not centered part of the field using the zeroPoint parameter.

Parameters
cfField to be interpolated.
samplingParametersContains the new number of sampling points and the sampling distance of the interpolated field relative to the sampling distance before the interpolation. A sampling distance less than 1 means a finer sampling grid. A sampling distance greater than one indicates a rougher sampling grid.
zeroPointZero position of the interpolated field in pixel coordinates. Use this parameter to interpolate non centered parts of the original field. The zero point parameter specifies the position of the center of the interpolated field and is measured in the pixel coordinates of the given field before the interpolation.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
Result of operation.

◆ DiscreteOversampling()

static ComplexField DiscreteOversampling ( ComplexField  field,
Vector  factor 
)
static

Inserts zero points between sampling points.

Parameters
fieldComplexField to which the operation is applied.
factorE.g. a factor of two means, that every second sampling point is zero.
Returns
Result of operation.

◆ Interpolation()

static ComplexField Interpolation ( ComplexField  cf,
SamplingParameters  samplingParameters,
VectorD  zeroPoint,
InterpolationMethod  interpolationMethod,
ExtrapolationInfo  extrapolation 
)
static

Interpolates a ComplexField using the specified interpolation method. It is possible to interpolate a not centered part of the field using the zeroPoint parameter.

Parameters
cfField to be interpolated.
samplingParametersContains the new number of sampling points and the sampling distance of the interpolated field relative to the sampling distance before the interpolation. A sampling distance less than 1 means a finer sampling grid. A sampling distance greater than one indicates a rougher sampling grid.
zeroPointZero position of the interpolated field in pixel coordinates. Use this parameter to interpolate non centered parts of the original field. The zero point parameter specifies the position of the center of the interpolated field and is measured in the pixel coordinates of the given field before the interpolation.
interpolationMethodMethod used for interpolation.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
Result of operation.

◆ LinearInterpolation()

static ComplexField LinearInterpolation ( ComplexField  cf,
SamplingParameters  samplingParameters,
VectorD  zeroPoint,
ExtrapolationInfo  extrapolation 
)
static

Interpolates a ComplexField using the linear interpolation method. It is possible to interpolate a not centered part of the field using the zeroPoint parameter. 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.

Parameters
cfField to be interpolated.
samplingParametersContains the new number of sampling points and the sampling distance of the interpolated field relative to the sampling distance before the interpolation. A sampling distance less than 1 means a finer sampling grid. A sampling distance greater than one indicates a rougher sampling grid.
zeroPointZero position of the interpolated field in pixel coordinates. Use this parameter to interpolate non centered parts of the original field. The zero point parameter specifies the position of the center of the interpolated field and is measured in the pixel coordinates of the given field before the interpolation.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
The interpolated field.

◆ LinearInterpolation_RealAndImaginaryPart()

static ComplexField LinearInterpolation_RealAndImaginaryPart ( ComplexField  cf,
SamplingParameters  samplingParameters,
VectorD  zeroPoint,
ExtrapolationInfo  extrapolation 
)
static

Interpolates a ComplexField using the linear interpolation method. It is possible to interpolate a not centered part of the field using the zeroPoint parameter. The interpolation is done between 4 neighbor points. The function interpolates the real part and imaginary part of the complex values at all points separately.

Parameters
cfField to be interpolated.
samplingParametersContains the new number of sampling points and the sampling distance of the interpolated field relative to the sampling distance before the interpolation. A sampling distance less than 1 means a finer sampling grid. A sampling distance greater than one indicates a rougher sampling grid.
zeroPointZero position of the interpolated field in pixel coordinates. Use this parameter to interpolate non centered parts of the original field. The zero point parameter specifies the position of the center of the interpolated field and is measured in the pixel coordinates of the given field before the interpolation.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
Result of operation.

◆ NearestNeighbourInterpolation()

static ComplexField NearestNeighbourInterpolation ( ComplexField  cf,
SamplingParameters  samplingParameters,
VectorD  zeroPoint,
ExtrapolationInfo  extrapolation 
)
static

Interpolates a ComplexField using the nearest neighbor interpolation method. It is possible to interpolate a not centered part of the field using the zeroPoint parameter.

Parameters
cfField to be interpolated.
samplingParametersContains the new number of sampling points and the sampling distance of the interpolated field relative to the sampling distance before the interpolation. A sampling distance less than 1 means a finer sampling grid. A sampling distance greater than one indicates a rougher sampling grid.
zeroPointZero position of the interpolated field in pixel coordinates. Use this parameter to interpolate non centered parts of the original field. The zero point parameter specifies the position of the center of the interpolated field and is measured in the pixel coordinates of the given field before the interpolation.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
Result of operation.

◆ SincInterpolationFFT()

static ComplexField SincInterpolationFFT ( ComplexField  cf,
SamplingParameters  samplingParameters,
VectorD  zeroPoint 
)
static

Interpolates a ComplexField using the sinc interpolation method by FFT. It is possible to interpolate a not centered part of the ComplexField using the zeroPoint parameter.

Parameters
cfField to be interpolated.
samplingParametersContains the new number of sampling points and the sampling distance of the interpolated field relative to the sampling distance before the interpolation. A sampling distance less than 1 means a finer sampling grid. A sampling distance greater than one indicates a rougher sampling grid.
zeroPointZero position of the interpolated field in pixel coordinates. Use this parameter to interpolate non centered parts of the original field. The zero point parameter specifies the position of the center of the interpolated field and is measured in the pixel coordinates of the given field before the interpolation.
Returns
Result of operation.

◆ SincInterpolationPointwise()

static ComplexField SincInterpolationPointwise ( ComplexField  cf,
SamplingParameters  samplingParameters,
VectorD  zeroPoint,
ExtrapolationInfo  extrapolation 
)
static

Interpolates a ComplexField using a point-wise sinc interpolation. It is possible to interpolate a not centered part of the field using the zeroPoint parameter.

Parameters
cfField to be interpolated.
samplingParametersContains the new number of sampling points and the sampling distance of the interpolated field relative to the sampling distance before the interpolation. A sampling distance less than 1 means a finer sampling grid. A sampling distance greater than one indicates a rougher sampling grid.
zeroPointZero position of the interpolated field in pixel coordinates. Use this parameter to interpolate non centered parts of the original field. The zero point parameter specifies the position of the center of the interpolated field and is measured in the pixel coordinates of the given field before the interpolation.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
Result of operation.

◆ TruncatedSincInterpolation()

static ComplexField TruncatedSincInterpolation ( ComplexField  cf,
SamplingParameters  samplingParameters,
VectorD  zeroPoint,
ExtrapolationInfo  extrapolation 
)
static

Interpolates a ComplexField using the truncated sinc interpolation method. It is possible to interpolate a not centered part of the field using the zeroPoint parameter.

Parameters
cfComplexField to interpolate.
samplingParametersContains the new number of Sampling Points and the sampling distance of the interpolated ComplexField relative to the sampling distance before the interpolation. A sampling distance lower 1 means a finer sampling grid. A sampling distance larger one indicates a rough sampling grid.
zeroPointZero position of the interpolated field in pixel coordinates. Use this parameter to interpolate non centered parts of the original ComplexField. The zero point parameter specifies the position of the centre of the interpolated ComplexField and is measured in the pixel coordinates of the ComplexField before the interpolation.
extrapolationThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
Interpolated ComplexField.

◆ WindowedSincInterpolation() [1/2]

static ComplexField WindowedSincInterpolation ( ComplexField  cf,
SamplingParameters  samplingParameters,
VectorD  zeroPoint 
)
static

Similar to the interpolation WindowedSincInterpolation(ComplexField cf, SamplingParameters samplingParameters, VectorD zeroPoint, int borderPixels) (see there) but with 3 border pixels.

Parameters
cfField to be interpolated.
samplingParametersContains the new number of sampling points and the sampling distance of the interpolated field relative to the sampling distance before the interpolation. A sampling distance less than 1 means a finer sampling grid. A sampling distance greater than one indicates a rougher sampling grid.
zeroPointZero position of the interpolated field in pixel coordinates. Use this parameter to interpolate non centered parts of the original field. The zero point parameter specifies the position of the center of the interpolated field and is measured in the pixel coordinates of the given field before the interpolation.
Returns
Result of operation.

◆ WindowedSincInterpolation() [2/2]

static ComplexField WindowedSincInterpolation ( ComplexField  cf,
SamplingParameters  samplingParameters,
VectorD  zeroPoint,
int  borderPixels 
)
static

In difference to standard sinc interpolation (FFT based) that always interpolates the whole ComplexField this function extracts the desired interpolation array plus the border pixels on every side. This extracted array is sinc interpolated (FFT based). Since the sinc interpolation is a global interpolation this interpolation is only an approximation. Strongest numerical errors cna be found close to the borders of the interpolated field. Decrease errors can be achieved by increasing the number of border pixels.

Parameters
cfField to be interpolated.
samplingParametersContains the new number of sampling points and the sampling distance of the interpolated field relative to the sampling distance before the interpolation. A sampling distance less than 1 means a finer sampling grid. A sampling distance greater than one indicates a rougher sampling grid.
zeroPointZero position of the interpolated field in pixel coordinates. Use this parameter to interpolate non centered parts of the original field. The zero point parameter specifies the position of the center of the interpolated field and is measured in the pixel coordinates of the given field before the interpolation.
borderPixelsWidth of border around numerical window.
Returns
Result of operation.