Class ComplexFieldPointInterpolation
- Namespace
- VirtualLabAPI.Core.Numerics
- Assembly
- VirtualLabAPI.dll
Class with static members that are able to interpolate point-wise 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.
[Serializable]
public class ComplexFieldPointInterpolation
- Inheritance
-
ComplexFieldPointInterpolation
- Inherited Members
Constructors
ComplexFieldPointInterpolation()
Default constructor for all optimized interpolations.
public ComplexFieldPointInterpolation()
Methods
Cubic4PointInterpolation(ComplexField, VectorD, ExtrapolationInfo)
Performs a cubic 4 point interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 4 neighbor points. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.
public static Complex Cubic4PointInterpolation(ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
Parameters
cfComplexFieldComplexField for interpolation.
pointVectorDPosition to interpolate.
extrapolationExtrapolationInfoThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
- Complex
Result of operation.
Cubic4PointInterpolationKernel(double)
This function calculates the one-dimensional interpolation kernel of the cubic 4 point interpolation.
public static double Cubic4PointInterpolationKernel(double dx)
Parameters
dxdoubleDistance from the interpolation point in pixels.
Returns
- double
Result of operation.
Cubic4PointInterpolationOpt(ComplexField, double, double, ExtrapolationInfo)
Performs an optimized cubic 4 point interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 4 neighbor 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.
public Complex Cubic4PointInterpolationOpt(ComplexField cf, double coord_x, double coord_y, ExtrapolationInfo extrapolation)
Parameters
cfComplexFieldComplexField for interpolation.
coord_xdoublex-coordinate of the position to interpolate for.
coord_ydoubley-coordinate of the position to interpolate for.
extrapolationExtrapolationInfoThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
- Complex
Result of operation.
Cubic6PointInterpolation(ComplexField, VectorD, ExtrapolationInfo)
Performs a cubic 6 point interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 6 neighbor points. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.
public static Complex Cubic6PointInterpolation(ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
Parameters
cfComplexFieldComplexField for interpolation.
pointVectorDPosition to interpolate.
extrapolationExtrapolationInfoThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
- Complex
Result of operation.
Cubic6PointInterpolationOpt(ComplexField, VectorD, ExtrapolationInfo)
Performs an optimized cubic 6 point interpolation of a \linkToDoc{ComplexField}{API.Core.Numerics.ComplexField} on a specific point (x,y). The interpolation is done between 6 neighbor 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.
public Complex Cubic6PointInterpolationOpt(ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
Parameters
cfComplexFieldComplexField for interpolation.
pointVectorDPosition to interpolate.
extrapolationExtrapolationInfoThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
- Complex
Result of operation.
Cubic6PointInterpolationWithDerivatives(ComplexField, VectorD, ExtrapolationInfo, out Complex, out Complex)
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.
public static Complex Cubic6PointInterpolationWithDerivatives(ComplexField cf, VectorD point, ExtrapolationInfo extrapolation, out Complex derivX, out Complex derivY)
Parameters
cfComplexFieldComplexField for interpolation.
pointVectorDPosition to interpolate.
extrapolationExtrapolationInfoThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
derivXComplexOut parameter giving the derivative in x-direction.
derivYComplexOut parameter giving the derivative in y-direction.
Returns
- Complex
Result of operation.
Cubic8PointInterpolation(ComplexField, VectorD, ExtrapolationInfo)
Performs a cubic 8 point interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 8 neighbor points. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.
public static Complex Cubic8PointInterpolation(ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
Parameters
cfComplexFieldComplexField for interpolation.
pointVectorDPosition to interpolate.
extrapolationExtrapolationInfoThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
- Complex
Result of operation.
Cubic8PointInterpolationOpt(ComplexField, VectorD, ExtrapolationInfo)
Performs an optimized cubic 8 point interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 8 neighboring 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.
public Complex Cubic8PointInterpolationOpt(ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
Parameters
cfComplexFieldComplexField for interpolation.
pointVectorDPosition to interpolate.
extrapolationExtrapolationInfoThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
- Complex
Result of operation.
Interpolation(ComplexField, VectorD, InterpolationMethod, ExtrapolationInfo)
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.
public static Complex Interpolation(ComplexField cf, VectorD point, InterpolationMethod interpolationMethod, ExtrapolationInfo extrapolation)
Parameters
cfComplexFieldComplexField for interpolation.
pointVectorDPosition to interpolate.
interpolationMethodInterpolationMethodInterpolation method.
extrapolationExtrapolationInfoThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
- Complex
Result of operation.
Exceptions
- ArgumentException
Interpolation method not supported.
InterpolationOpt(ComplexField, VectorD, InterpolationMethod, ExtrapolationInfo)
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.
public Complex InterpolationOpt(ComplexField cf, VectorD point, InterpolationMethod interpolationMethod, ExtrapolationInfo extrapolation)
Parameters
cfComplexFieldComplexField for interpolation.
pointVectorDPosition to interpolate.
interpolationMethodInterpolationMethodInterpolation method.
extrapolationExtrapolationInfoThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
- Complex
Result of operation.
LinearInterpolation(ComplexField, VectorD, ExtrapolationInfo)
Performs a linear interpolation of a ComplexField on a specific point (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.
public static Complex LinearInterpolation(ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
Parameters
cfComplexFieldComplexField to interpolate.
pointVectorDPosition to interpolate.
extrapolationExtrapolationInfoThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
- Complex
Result of operation.
LinearInterpolationPhysical(ComplexField, VectorD, VectorD, ExtrapolationInfo, bool)
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.
public static Complex LinearInterpolationPhysical(ComplexField cf, VectorD samplingDistance, VectorD point, ExtrapolationInfo extrapolation, bool interpolatePhaseAndAmplitude)
Parameters
cfComplexFieldComplexField to interpolate.
samplingDistanceVectorDThe sampling distance of the field.
pointVectorDPhysical position to interpolate.
extrapolationExtrapolationInfoThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
interpolatePhaseAndAmplitudeboolIf true, phase and amplitude is interpolated at point. if false, real part and imaginary part is interpolated at point.
Returns
- Complex
Result of operation.
LinearInterpolation_RealAndImaginaryPart(ComplexField, VectorD, ExtrapolationInfo)
Performs a linear interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 4 neighbor points. The function interpolates the real and the imaginary part. There is no separate interpolation of amplitude and phase!
public static Complex LinearInterpolation_RealAndImaginaryPart(ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
Parameters
cfComplexFieldComplexField to interpolate.
pointVectorDPosition to interpolate.
extrapolationExtrapolationInfoThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
- Complex
Result of operation.
NearestNeighbourInterpolation(ComplexField, VectorD, ExtrapolationInfo)
Nearest neighbor interpolation of a ComplexField on a specific point (x,y). The interpolation is looking for the nearest neighbor pixel and returns its value. The coordinate system runs from 0 to SamplingPoints.X - 1 and from 0 to SamplingPoints.Y - 1.
public static Complex NearestNeighbourInterpolation(ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
Parameters
cfComplexFieldComplexField to interpolate.
pointVectorDPosition to interpolate.
extrapolationExtrapolationInfoThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
- Complex
Result of operation.
SincInterpolation(ComplexField, VectorD, ExtrapolationInfo)
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.
public static Complex SincInterpolation(ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
Parameters
cfComplexFieldComplexField for interpolation.
pointVectorDPosition to interpolate.
extrapolationExtrapolationInfoThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
- Complex
Result of operation.
SincInterpolationOpt(ComplexField, VectorD, ExtrapolationInfo)
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.
public Complex SincInterpolationOpt(ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
Parameters
cfComplexFieldComplexField to interpolate.
pointVectorDPosition to interpolate.
extrapolationExtrapolationInfoThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
- Complex
Result of operation.
TruncatedSincInterpolation(ComplexField, VectorD, ExtrapolationInfo)
Performs a truncated sinc interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 6 neighbor points. The coordinate system runs from 0 to SamplingPoints.X - 1 and 0 to SamplingPoints.Y - 1.
public static Complex TruncatedSincInterpolation(ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
Parameters
cfComplexFieldComplexField for interpolation.
pointVectorDPosition to interpolate.
extrapolationExtrapolationInfoThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
- Complex
Result of operation.
TruncatedSincInterpolationOpt(ComplexField, VectorD, ExtrapolationInfo)
Performs a truncated sinc interpolation of a ComplexField on a specific point (x,y). The interpolation is done between 6 neighbor 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.
public Complex TruncatedSincInterpolationOpt(ComplexField cf, VectorD point, ExtrapolationInfo extrapolation)
Parameters
cfComplexFieldComplexField for interpolation.
pointVectorDPosition to interpolate.
extrapolationExtrapolationInfoThe mode of extrapolation used if point lies outside the definition area of the ComplexField.
Returns
- Complex
Result of operation.